Past-paper question · 2012 May-June · Paper 22 · Q5(c)

Question 5(c) 2012 · May-June · Paper 22 · 1 mark
Reveal official mark-scheme answer

Official answer for Question 5
Part (c)
Part (c)
- infinite loop//runs out of stack space
[1]
✓
© University of Cambridge International Examinations 2012
✓
Mark Scheme: Teachers’ version
✓
Syllabus
✓
Paper
✓
GCE AS/A LEVEL – May/June 2012
✓
9691
Question 22
Show text version of question
Question 5
Part (c)
Question 5
Romana is learning about recursion. She designs a recursive function. For
Examiner's 01 FUNCTION Happening(Num) Use
02 IF Num = 1 03 THEN 04 Happening ← 1 05 ELSE 06 Happening ← Happening(Num - 1) + Num 07 ENDIF 08 ENDFUNCTION
Part (c)
State what will happen if the function is called with Happening(-1).
[1]
Topic relevance
Why this question appears here
98% assigned-topic match · Computational thinking and problem-solving › Recursion
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9691_s12_qp_22.pdf
