Exam-style question
Try this first
What is the main purpose of a stack frame when a subroutine is called?.
- A.To store information needed to pause and later resume the calling subroutine
- B.To permanently store every value used by the whole program
- C.To translate the subroutine into machine code
- D.To determine which programming language the subroutine uses
Answer and explanation
Concise answer
To store information needed to pause and later resume the calling subroutine
Why this is correct
A stack frame stores details for one active subroutine call, including the return address, parameters and local variables. This allows the subroutine to execute and then return correctly.
Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.
Common mistake
No common mistake is linked to this question yet.
