Here is a sketch of two C functions / and g:int f(int x) { int i; ••• return i+1; ••• } int g(int y) { int j; ••• f( j+ D ••• 1That is, function g calls /. Draw the top of the stack, starting with the activation record for g, after g calls /, and / is about to return. You can consider only return values, parameters, control links, and space for local variables; you do not have to consider stored state or temporary or local values not shown in the code sketch. However, you should indicate:a) Which function creates the space on the stack for each element?b) Which function writes the value of each element?c) To which activation record does the element belong?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here