Skip to main content
A-LevelComputer ScienceData types and structures9618/23 · May/June 2023 · Q110 Marks

Refer to the insert for the list of pseudocode functions and operators. The following pseudocode represents part of the algorithm for a program. Line numbers are for reference only. ``` 10 DECLARE Sheet4 : ARRAY[1:2, 1:50] OF INTEGER ... 100 FOR PCount ← Ο ΤΟ 49 101 Sheet4 [1, PCount] ← 0 102 Sheet4 [2, PCount] ← 47 103 NEXT PCount ```

  1. (a)The pseudocode contains references to an array. Complete the table by writing the answer for each row. | | Answer | |:---|:---| | The dimension of the array | | | The name of the variable used as an array index | | | The number of elements in the array | |[3]
  2. (b)The pseudocode contains two errors. One error is that variable PCount has not been declared. Identify the other error and state the line number where it occurs. Error Line number[2]
  3. (c)The pseudocode does not include a declaration for PCount. State the data type that should be used in the declaration.[1]
  4. (d)The pseudocode statements given in the following table are used in other parts of the algorithm. Complete the table by placing one or more ticks (✔) in each row. The first row has already been completed. | Pseudocode statement | Input | Process | Output | |:---|:---:|:---:|:---:| | INPUT MyChoice | ✔ | | | | OUTPUT FirstName & LastName | | | | | WRITEFILE YourFile, TextLine | | | | | READFILE MyFile, TextLine | | | | | Result ← SQRT(NextNum) | | | |[4]

Mark scheme

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

  1. [3] The dimension of the array: 2
  2. [3] The name of the variable used as an array index: PCount
  3. [3] The number of elements in the array: 100
  4. [2] One mark per point: The (second dimension/index of the) array is declared from 1 to 50 but the loop runs from 0 to 49
  5. [2] Line number: 10/100/101/102
  6. [1] Integer
  7. [4] One mark for each of rows 2 - 5
  8. [4] OUTPUT FirstName & LastName: Output (✓)
  9. [4] WRITEFILE OutputFile, TextLine: Output (✓)
  10. [4] READFILE MyFile, TextLine: Input (✓)
  11. [4] Result ← SQRT(NextNum): Process (✓)

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
Data types and structures, A-Level Computer Science (syllabus 9618). Structured question, 10 marks.
Source
A-Level Computer Science, May/June 2023 Paper 2 Variant 3, question 1.

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