Question: For the following sub - problems, consider the following program: float bar ( int r , int s ) { float i; i = 2
For the following subproblems, consider the following program:
float barint r int s float i; i r s; return i; int fooint a int b float g; g barb a; return intg; int fooint a int b float h; h bara b; return inth; void main int x; int y; float f; x x y; y foox y foox y; some computations
Question
Q
Points
Grading comment:
Assume your program is running on a machine with registers, using callee saves. Assume address ie pointers are bytes, floats are bytes and ints are bytes. Draw the complete stack ie the stack including all active activation records for the program right after the first time bar has been called, and before bar returns. For each slot in the stack, indicate what is stored there, and how much space that slot takes up
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
