Past-paper question · 2022 October-November · Paper 22 · Q3(c)

Question 3(c) 2022 · October-November · Paper 22 · 5 marks

Original past-paper question for 3(C)
Original past-paper question for 3(C)
Original past-paper question for 3(C)
Reveal official mark-scheme answer Official mark-scheme answer for 3(C)

Official answer for Question 3

Part (c)

✓
One mark for each:

Question 5

Question 1

✓
Data 'After Group 1' (as shown, including blank cells)

Question 2

✓
Data 'After Group 2' (as shown, including blank cells)

Question 3

✓
Data 'After Group 3' (as shown, including blank cells)

Question 4

✓
SP 'After Group 1' pointing to location 955

Question 5

✓
Final two SPs pointing to locations 952 and 954
✓
Cambridge International AS & A Level – Mark Scheme
✓
9618/22
✓
October/November
✓
PUBLISHED
✓
2022
✓
Question
✓
Answer
✓
Marks

Mark scheme 9618_w22_ms_22.pdf →

Show text version of question

Question 3

Part (c)

Question 3

A stack is used in a program to store string data which needs to be accessed in several modules.

Part (c)

A second stack is used in the program. The diagram below shows the initial state of this

stack. Value X is at the top of the stack and was the last item added.

Upper-case letters are used to represent different data values.

Stack operations are performed in three groups as follows:

Group 1: PUSH D PUSH E

Group 2: POP POP POP

Group 3: PUSH A PUSH B POP PUSH C

Complete the diagram to show the state of the stack after each group of operations has been performed.

Include the current stack pointer (SP) after each group.

Memory Initial After After After location state Group 1 Group 2 Group 3

957

956

955

954

953 X ←SP 952 Y

951 Z

950 P

[5]

Question 7

Question 8

Topic relevance

Why this question appears here

71% assigned-topic match · Programming › Constructs

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 9618_w22_qp_22.pdf

Keep practising this topic