Which data structure does a program’s run-time system use to manage function calls and recursion?
Correct answer C. Stack
Each function call pushes an activation record holding parameters, local variables and the return address onto the call stack, and returning pops it. Because the most recent call always finishes first, LIFO order fits exactly. Very deep recursion can exhaust this space and cause a stack overflow error. The dynamic memory heap used for allocation is unrelated to the heap data structure.
Answer checked How we write and check questions
Discussion