Computer Science (AS & A Level) · Oct / Nov 2024 · Paper 22 · Question 5
9618
As printed in the paper
The question as text
A program contains a global 1D array Data with 100 elements of type INTEGER. The program contains a function Process() expressed in pseudocode as follows: FUNCTION Process(Number : INTEGER, Label : STRING) RETURNS STRING DECLARE Index, Count : INTEGER DECLARE ReturnValue : STRING Count INT(100 / Number) Index Data[Number] CASE OF (Index MOD 2) 0 : ReturnValue TO_UPPER(RIGHT(Label, Count)) 1 : ReturnValue "****" ENDCASE RETURN RetVal ENDFUNCTION
Read automatically from the paper; the printed page above is exact.
Show the answer and mark scheme
5(a)[3]
5(b)[2]
5(c)[2]
Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.

