SHSubjectHub

Stack Frames & Recursive Techniques

AQA 75174.1.1.15–16A-levelLesson packSubscription
Also online

This worksheet marks itself

Set it as homework or classwork and every answer is marked as pupils go, with feedback on what they got wrong. The scores go straight into your mark book, so you can see who needs help before the next lesson.

  • 10 questions
  • 39 marks
  • about 55 minutes
  • marked instantly

Question types: multiple choice, true or false, fill the gap, matching, short answer.

About this resource

AQA A-level Computer Science (7517) Paper 1, 4.1.1.15–4.1.1.16 — how a stack frame stores a subroutine call's return address, parameters and local variables; how the call stack grows and shrinks through nested calls; and recursive techniques (general case, base case, and the mechanism of implemen…

28 slides.

Lesson outline

  1. Do Now — Retrieval
  2. I-Do: Why Does a Program Need to Remember Where to Return To?
  3. Quick Check — Why the Return Address Matters
  4. I-Do: What's Inside a Stack Frame?
  5. Hinge Check — What a Stack Frame Stores
  6. I-Do: The Call Stack Is LIFO — Pushing and Popping
  7. The Call Stack in Action
  8. I-Do: A Worked Example — Nested Calls Growing and Shrinking the Stack
  9. We-Do — Trace the Call Stack at a Given Moment
  10. Hinge Check — LIFO Misconception
  11. I-Do: Every Call Gets Its OWN Frame
  12. Hinge Check — Shared Frame Misconception
Unit bundlePaper 1
Part of: Paper 1: the whole unitEvery resource in the unit in one zip.

More from 4.1 Fundamentals of programming