Note AcademyNote Academy

Computer Science (AS & A Level) · May / June 2024 · Paper 23 · Question 5

9618

As printed in the paper

The question as text

A program is being designed in pseudocode. The program contains the following declaration: DECLARE Data : ARRAY[1:1000] OF STRING A procedure ArrayInitialise() is written to initialise the values in the array: PROCEDURE ArrayInitialise(Label : STRING) DECLARE Index : INTEGER Index 1 WHILE Index <= 1000 CASE OF (Index MOD 2) 0 : Data[Index] FormatA(Label) Index Index + 1 1 : Data[Index] FormatB(Label) Index Index + 1 ENDCASE ENDWHILE ENDPROCEDURE Functions FormatA() and FormatB() apply fixed format case changes to the parameter string.

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

Show the answer and mark scheme
  • 5(a)[2]

  • 5(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.