Note AcademyNote Academy

Computer Science (AS & A Level) · Oct / Nov 2024 · Paper 22 · Question 3

9618

As printed in the paper

The question as text

A program uses a stack to hold up to 60 numeric values. The stack is implemented using two integer variables and a 1D array. The array is declared in pseudocode as shown: DECLARE ThisStack : ARRAY[1:60] OF REAL The stack operates as follows: • Global variable SP acts as a stack pointer that points to the next available stack location. The value of SP represents an array index. • Global variable OnStack represents the number of values currently on the stack. • The stack grows upwards from array element index 1.

Read automatically from the paper; the printed page above is exact.

Show the answer and mark scheme
  • 3(a)(i)[1]

  • 3(a)(ii)[2]

  • 3(b)[4]

Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.