Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Assume that for each function call, the compiler will increase the stack size by

ID: 3763672 • Letter: A

Question

Assume that for each function call, the compiler will increase the stack size by the size of local variable + parameter calls + return address only Assume that compiler performs no optimization. For the following, three functions, what are the final stack look like assuming that you current frame is in function fibonancial and address of register esp before call function a is 0xA000 (Main function). Note that fibo is the recursive function, function that call itself many time We will consider stack when parameter I = 2, j = 1.

Explanation / Answer

two return statements taken at a time. if the process is excuted return 1 else return i*pow(i,j-1)

but you did not mention else statment.so in the power function which value will be return.