Question: The above code is written in C. Please complete Task 1 and Task 2. Consider the following snippet of code: struct NODE { int a;

 The above code is written in C. Please complete Task 1 and Task 2. Consider the following snippet of code: struct NODE \{ int a; struct NODE *b; struct NODE c; \}; struct NODE nodes [5]={ {9, nodes +4, NULL }, {32, nodes +2, nodes +3}, {16, The above code is written in C. Please complete Task 1 and Task 2.

Consider the following snippet of code: struct NODE \{ int a; struct NODE *b; struct NODE c; \}; struct NODE nodes [5]={ {9, nodes +4, NULL }, {32, nodes +2, nodes +3}, {16, NULL, nodes +4}, {41, nodes +1 , nodes } {81, nodes +3, nodes +1} \} struct NODE np= nodes +2 ; struct NODE npp=& nodes[1].b; Task 1: Using the boxes below you are to draw the representation of the nodes array declared above (including variables and their values). This will help you complete the remainder of this lab. You are to assume (pretend) the nodes array begins at address location 200 and that the computer is 64-bit architecture. This information is needed to help you determine the address of each node and the elements of a node. Task 2: You will need to evaluate each expression to determine the value. If the expression cannot be evaluated enter ILLEGAL, if the expression can be evaluated but there is no way to know the value then enter DO NOT KNOW. You should evaluate each expression with the original values shown (In other words do not use the results of one expression to evaluate the next expression.) Using the above information, complete the following chart. nodes[3].b->b \&nodes[3].a \&nodes[3].c \&nodes[3].c->a \&nodes->a np np->a np->c->c->a npp npp->a *npp *npp->a (* npp)>a \&np \&np->a \&np->c->c->a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!