2 marksAbstract Data Types (ADTs)
CAPE Computer Science Unit 2 · 2014 · Paper 2 · Question 1(b)(iii)
In a searching application, the procedures Add or Mult pop the stack twice, add or multiply the popped values respectively, and push the result back onto the stack. Given X = 1, Y = 2, Z = 3, and W = 4.
Explain what will happen to the stack if the ADD operation is continuously applied to it.
The mark scheme is shown once you've answered.
Practise this question