Question 6(c) 2023 · October-November · Paper 21 · 3 marks
Reveal official mark-scheme answer
Official answer for Question 6
Part (c)
Question 3
Show text version of question
Question 6
Part (c)
Question 6
An algorithm has been written in pseudocode.
01 DECLARE A[1:10] : STRING 02 DECLARE T : STRING 03 DECLARE C, L : INTEGER 04 L 10 05 FOR C 1 TO L 06 OUTPUT "Please enter name " 07 INPUT A[C] 08 NEXT C 09 FOR C 1 TO L 10 FOR L 1 TO 9 11 IF A[L] > A[L + 1] 12 THEN 13 T A[L] 14 A[L] A[L + 1] 15 A[L + 1] T 16 ENDIF 17 NEXT L 18 NEXT C 19 FOR C 1 TO L 20 OUTPUT "Name ", C, " is ", A[C] 21 NEXT C
Part (c)
Meaningful identifiers have not been used in this algorithm.
Suggest suitable meaningful identifiers for:
The array:
The variables:
T ................................................................................................................................................
L ................................................................................................................................................
Why this question appears here
52% assigned-topic match · Programming › Programming concepts
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 0478_w23_qp_21.pdf
