Question 5(c) 2024 · October-November · Paper 22 · 2 marks
Reveal official mark-scheme answer
Official answer for Question 5
Part (c)
Question 2
Show text version of question
Question 5
Part (c)
Question 5
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
Part (c)
The function Process() contains a selection construct using a CASE structure.
Write pseudocode using a single selection construct with the same functionality without using a CASE structure.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................
Question 12
, ,
Why this question appears here
71% assigned-topic match · Programming › Constructs
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9618_w24_qp_22.pdf
