logo

AQA A-Level Computer Science practice

What is the main purpose of a stack frame when a subroutine is called?

Try the question first, then check the answer and practise the same topic again.

At a glance

MCQ

Type

practice

Style

Topic

Programming

Exam-style question

Try this first

What is the main purpose of a stack frame when a subroutine is called?.

  1. A.To store information needed to pause and later resume the calling subroutine
  2. B.To permanently store every value used by the whole program
  3. C.To translate the subroutine into machine code
  4. 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.

Related flashcards

No flashcards are published for this page yet.

Related practice questions