Question: 3. (30 points, C language) Consider the following C program. Assume that the register SP at the ints to 0x0800. Answer the following questions. Assume
3. (30 points, C language) Consider the following C program. Assume that the register SP at the ints to 0x0800. 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. B. (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 after execution of this code snippet (as you would see them printed by the corresponding printf statements)? x, y, z, and mych C. (10 points) Show assembly language implementation of the statement at lines 7 and 14. 10 A. Address M115:01 | Comment Address M150 Comment C
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
