Skip to main content
O-LevelComputer ScienceAlgorithm design and problem-solving2210/22 · May/June 2021 · Q54 Marks

5 A one-dimensional array dataArray[1:20] needs each element set to zero.

  1. (a)Write a pseudocode routine that sets each element to zero. Use the most suitable loop structure.[3]
  2. (b)Explain why you chose this loop structure.[1]

Mark scheme

Marking points from the official mark scheme (May/June 2021). The mark or mark type is shown in brackets.

  1. [1] Use of FOR loop
  2. [1] Working loop with correct number of Iterations
  3. [1] Correct assignment
  4. [1] FOR Count ← 1 TO 20
  5. [1] dataArray[Count] ← 0
  6. [1] NEXT (Count)
  7. [1] (A FOR loop has) a fixed number of repetitions //
  8. [1] No need to manage the loop counter //
  9. [1] no need to use another variable for the array index

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 →

About this question

Topic
Algorithm design and problem-solving, O-Level Computer Science (syllabus 2210). Structured question, 4 marks.
Source
O-Level Computer Science, May/June 2021 Paper 2 Variant 2, question 5.

Questions and mark schemes are from past examination papers and remain the copyright of the exam board. How Oracle Prep builds its content

Related Computer Science questions

© 2026 Oracle Prep