Exam-style question
Try this first
What normally happens to a subroutine's stack frame when that subroutine returns?.
- A.It is removed from the stack
- B.It is copied permanently into the program code
- C.It becomes the stack frame for every later subroutine call
- D.It is moved to the bottom of the stack and kept indefinitely
Model answer
What a good answer should say
- It is removed from the stack
Explanation
Why this works
When the subroutine finishes, its stack frame is no longer needed. It is removed, allowing the stack to return to the state associated with the caller.
Common mistake
No common mistake is linked to this question yet.
