A global 1D array of integers contains four elements, which are assigned values as shown: Mix[1] ← 1 Mix[2] ← 3 Mix[3] ← 4 Mix[4] ← 2 A procedure Process() manipulates the values in the array. The procedure is written in pseudocode: PROCEDURE Process(Start : INTEGER) DECLARE Value, Index, Count : INTEGER Index ← Start Count ← 0 REPEAT Value ← Mix[Index] Mix[Index] ← Mix[Index] - 1 Index ← Value Count ← Count + 1 UNTIL Count = 5 Mix[4] ← Count * Index ENDPROCEDURE Complete the trace table on the opposite page by dry running the procedure when it is called as follows: CALL Process(3)
- Complete the trace table on the opposite page by dry running the procedure when it is called as follows: CALL Process(3)[6]
Mark scheme
Marking points from the official mark scheme (Oct/Nov 2023). The mark or mark type is shown in brackets.
- [6] One mark for:
- Initialisation row
- Each iteration of Count 1 to 4 with correct Index, Count and array Mix as shown
- Final iteration, Count = 5, correct Index, Count and array Mix as shown plus Mix[4] assignment
Write your answer and get it marked
On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.
Sign up free →