Question 2(b)(iii) 2019 · May-June · Paper 42 · 7 marks
Reveal official mark-scheme answer
Official answer for Question 2
Part (b)
(iii)
Question 1
mark for each bullet
Question 7
Show text version of question
Question 2
Part (b)
(iii)
Question 2
A stack is an Abstract Data Type (ADT).
55 Top of stack
Question 43
Question 35
Question 20
(iii)
The stack is implemented as a 1D array, with eight elements, and given the identifier
ArrayStack.
The global variable Top contains the index of the last element in the stack, or −1 if the stack is empty.
The function Push():
- takes as a parameter an INTEGER value to place on the stack
- adds the value to the top of the stack and returns TRUE to show that the operation
- returns FALSE if the stack is full.
was successful
Write an algorithm in pseudocode for the function Push().
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.....................................................................................................................................
Question 15
Why this question appears here
82% assigned-topic match · Programming › Structured programming
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 9608_s19_qp_42.pdf
