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
How would you add the double 75.6 to the end of an ArrayList of Doubles named myDoubles?
eduard

Answer:

myDoubles.add(75.6);

Explanation:

ArrayList<Double> myDoubles = new ArrayList<Double>();

myDoubles.add(10.8);

myDoubles.add(92.46);

myDoubles.add(75.6);

The above code creates a double ArrayList called myDoubles. We add 10.8 and 92.46 initially. After these numbers, 75.6 is added to the myDoubles using <em>add</em> method (You need to type the list name, ".", and the method name to add the number)

6 0
3 years ago
One technique to find the "things" that need to be included in the new system begins by starting with a user and the use cases a
Shalnov [3]

Answer:

Coding is a skill where you take instructions (the steps in a task) and translate it into a languaage.

Explanation:

Coding is a skill where you take instructions (the steps in a task) and translate it into a language the computer understands since computers do not communicate like humans. They communicate in a language called BINARY and

6 0
4 years ago
Which guidelines should you follow when adding tables or spreadsheets to your presentations?
zhenek [66]
<span>What guidelines should you follow when adding tables or spreadsheets to your presentations?

a. Limit the number of columns to four.
b. Make them large enough so they can be seen by your audience.
c. Use a small font size (10-point or less) so all of your information fits on the slide.
d. Use at least eight rows.
e. Use column and row headers that are appropriate and descriptive.</span>

A, B, E are the answers. I know this is a different script but should help you if need be.
5 0
4 years ago
Read 2 more answers
n 3 to 4 sentences, write a note to a friend describing how to move text from one part of a document to a different part of the
EleoNora [17]
Select the part you want to move.  Highlight it, and click ctrl+x.  Then, go to the place you want to put it.  Click ctrl+v.  It should be cut and pasted
8 0
3 years ago
Read 2 more answers
Distinctions between synchronous and asynchronous models of digital communication are primarily associated with which of the Bay
Olin [163]

Answer:

Explanation:

Synchronous Transmission:

In Synchronous Transmission, data is sent in form of blocks or frames. This transmission is the full duplex type. Between sender and receiver the synchronization is compulsory. In Synchronous transmission, There is no gap present between data. It is more efficient and more reliable than asynchronous transmission to transfer the large amount of data.

Asynchronous Transmission:

In Asynchronous Transmission, data is sent in form of byte or character. This transmission is the half duplex type transmission. In this transmission start bits and stop bits are added with data. It does not require synchronization.

8 0
4 years ago
Read 2 more answers
Other questions:
  • Can't expand stack segment by 8 bytes to 524288 bytes.
    5·2 answers
  • What does it mean when your check engine light is blinking?
    10·1 answer
  • In 3-4 sentences, write a note to a friend describ
    6·2 answers
  • There are n coins, each showing either heads or tails. We would like all the coins to show the same face. What is the minimum nu
    6·1 answer
  • In mathematics, the notation n! represents the factorial of the nonnegative integer n. The factorial of n is the product of all
    7·1 answer
  • Explain what LIFO and FIFO mean, and how they are used in Abstract data types?
    5·1 answer
  • A computer needs both hardware and to be useful
    11·2 answers
  • Simplify the expression 7(2y + 1) + 3y
    10·2 answers
  • ALRIGHT SO- There's this link that's been going around, it's like- "tinyclick" then a buncha letters, please don't click on it,
    6·2 answers
  • Complete each of the following sentences by
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!