Past-paper question · 2025 October-November · Paper 22 · Q2(a)

Question 2(a) 2025 · October-November · Paper 22 · 5 marks

Original past-paper question for 2(A)
Original past-paper question for 2(A)
Original past-paper question for 2(A)
Reveal official mark-scheme answer Official mark-scheme answer for 2(A)

Official answer for Question 2

Part (a)

✓
One mark per mark point, max five

Question 5

  • Line 01 / DECLARE Contacts : ARRAY[1:500, 1:4] OF REAL
✓
should be DECLARE Contacts : ARRAY[1:500, 1:4] OF STRING
  • Line 12 / OUTPUT FirstName
✓
should be INPUT FirstName
  • Line 17 / OUTPUT Contacts[Row, 1]
✓
should be OUTPUT Contacts[Row, Column]
  • Line 23 / NEXT Stop OR Row > 500
✓
should be UNTIL Stop OR Row > 500
  • Line 25 / 26 / Answer variable not declared
✓
should be DECLARE Answer : CHAR before line 25
  • Line 28 / Continue TRUE
✓
should be Continue FALSE
✓
0478/22
✓
Cambridge IGCSE – Mark Scheme
✓
October/November 2025
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 0478_w25_ms_22.pdf →

Show text version of question

Question 2

Part (a)

Question 2

This pseudocode algorithm is intended to input a first name from a user and search for it in a

two‑dimensional (2D) array. If the name is found, the algorithm outputs all the remaining details for that name. The algorithm will continue to allow other names to be entered for searching, until the user input stops it.

01 DECLARE Contacts : ARRAY[1:500, 1:4] OF REAL 02 DECLARE Row : INTEGER 03 DECLARE Column : INTEGER 04 DECLARE Continue : BOOLEAN 05 DECLARE Stop : BOOLEAN

06 DECLARE FirstName : STRING 07 Continue TRUE 08 Stop FALSE 09 WHILE Continue 10 Row 1 11 OUTPUT "Enter a first name " 12 OUTPUT FirstName 13 REPEAT 14 IF Contacts[Row, 1] = FirstName 15 THEN 16 FOR Column 1 TO 4 17 OUTPUT Contacts[Row, 1] 18 NEXT Column

19 Stop TRUE 20 ELSE 21 Row Row + 1 22 ENDIF 23 NEXT Stop OR Row > 500 24 OUTPUT "Search for another name? (Y or N)" 25 INPUT Answer 26 IF Answer = 'N' OR Answer = 'n' 27 THEN 28 Continue TRUE 29 ENDIF 30 ENDWHILE

Part (a)

Identify the line numbers of five errors in the pseudocode and suggest a correction for each

error.

Error 1 line number ......................................

Correction .................................................................................................................................

................................................................................................................................................... * 0000800000003 * DFD

Question 3

, ,

Error 2 line number ......................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 3 line number ......................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 4 line number ......................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 5 line number ......................................

Correction .................................................................................................................................

...................................................................................................................................................

[5]
Topic relevance

Why this question appears here

98% assigned-topic match · Algorithm design and problem-solving

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_w25_qp_22.pdf

Keep practising this topic