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.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.