Question: Problem #3. (25 points) C language, Stack Data Placement, Pointers Consider the following C program. Assume that the register SP at the beginning points to
Problem #3. (25 points) C language, Stack Data Placement, Pointers Consider the following C program. Assume that the register SP at the beginning points to Ox1100. Answer the following questions. Assume all variables are allocated on the stack, and in the order as they appear in the program A. (10 points Illustrate the content of the stack at the moment before the statement at line 7 is executed. (10 points) Comment the code (lines 7-14) indicating the result of each statement.Illustrate the content of the stack at the end of execution of the statement in line 14. What are values of variables x, y, z, and mych after execution of this code snippet (as you would see them printed by the corresponding printf statements)? C. (S points) Show assembly language implementation of the statement at lines 7, 8, and 14. unsigned int x 5 int y--4i 3 long int z -6 s unsigned int "pli 18 11 I "P i-12; 12 P11 -&z 131 P-11- pi-2 A. Address Ox1100 M 15.0 Comment (optional) To B. Address MI15.0 Comment (optional) C
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
