1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Phantasy [73]
3 years ago
13

Given the code segment below, complete the assignments as stated in the comments. struct aaa { int m; int nn; } struct bbb{ stru

ct aaa myfield; int sum; } struct bbb myvar; // write one statement to place the integer value 44 into the field sum of structure variable myvar . // write one statement to place the integer value -17 into the field nn of structure variable myvar .
Computers and Technology
1 answer:
grin007 [14]3 years ago
6 0

Answer:

  1. using namespace std;
  2. struct aaa {
  3.    int m;
  4.    int nn;
  5. };
  6. struct bbb{
  7.    struct aaa myfield;
  8.    int sum;  
  9. };
  10. struct bbb myvar;
  11. int main()
  12. {
  13.    myvar.sum =44;
  14.    myvar.myfield.nn = -17;
  15.    
  16.    cout<<myvar.sum<<"\n";
  17.    cout<<myvar.myfield.nn<<"\n";
  18.    return 0;
  19. }

Explanation:

Given two data structures (Line 2-9), we can set the value of 44 to field of sum structure variable myvar by using a dot syntax

                      myvar.sum = 44

To assign value to field of nn of structure in myvar, we need to access the myfield of myvar and then followed by nn. Hence, the statement shall be

                     myvar.myfield.nn = -17

In short the we can always use the dot syntax the access the value of an inner field of a particular data structure.

You might be interested in
If a fire should break out in your building, which of the following actions is NOT recommended?
quester [9]

C) Scream and run

you need to remain calm and carefully exit the building making sure you have everybody with you

6 0
3 years ago
Read 2 more answers
A leading global vendor of computer software, hardware for computer, mobile and gaming systems, and
V125BC [204]

Answer:

Microsoft

Explanation:

5 0
2 years ago
Does anyone play genshin impact here?
Reika [66]
Answer


NO sorry
Have a great day
6 0
3 years ago
Read 2 more answers
What is a feature of webmail
Fantom [35]

Answer:

Webmail allows the users to access their emails as long as they have access to an Internet connection and a web browser. This also means that the user cannot read an old email or draft a new email offline.

8 0
3 years ago
A Web site that allows users to enter text, such as a comment or a name, and then stores it and later display it to other users,
balandron [24]

Answer:

Option(c) is the correct answer.

Explanation:

Cross-site scripting is the type of security breach that are usually found in the  software applications.The main objective of cross site scripting it is used by the hackers to exploit the data security.

  • The cross site scripting is the collection of web pages  that enables people to insert the text like comment,  name stores it afterwards it save the data and then  it appears to the other users.
  • Others options are incorrect because they are not related to given scenario.
5 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following is true of property?
    13·1 answer
  • How can a chart help to display your data? How does one choose the best type of chart to use, and how does one ensure that he or
    12·1 answer
  • If you want to track users and sessions across multiple domains, what must you set up?
    11·1 answer
  • What is NOT a good habit when presenting to an audience?
    5·2 answers
  • The site is not allowing me to purchase the subscription. Please help?
    12·1 answer
  • Private sharing model on Opportunities. Leadership has asked the Administrator to create a new custom object that will track cus
    7·1 answer
  • What color mode would you use when designing for web &amp; devices?
    9·1 answer
  • Write 3 things that can't be done without technology.
    14·2 answers
  • Two girls were born to the same mother, on the same day, at the same time, in the same month and the same year and yet they're n
    7·1 answer
  • Identify and explain five areas where computers are used to process <br> data
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!