Past-paper question · 2025 May-June · Paper 22 · Q6(c)

Question 6(c) 2025 · May-June · Paper 22 · 3 marks

Original past-paper question for 6(C)
Original past-paper question for 6(C)
Original past-paper question for 6(C)
Reveal official mark-scheme answer Official mark-scheme answer for 6(C)

Official answer for Question 6

Part (c)

✓
One mark per mark point, max three

Question 3

✓
MP1 Uses an index to mark the start and end of each word // uses V1 to
✓
mark the start of the word and V2 to mark the end
✓
MP2 After each check, these are moved to the next character in the word at
✓
each end of the word // V1 is incremented by 1 and V2 is decremented
✓
by 1 after each check.
✓
MP3 When the two indexes match or cross, the whole word has been
✓
checked // When V1 = V2 or V1 > V2, the whole word has been
✓
checked
✓
MP4 The algorithm will exit if it is found that two compared letters are not the
✓
same.
✓
0478/22
✓
Cambridge IGCSE – Mark Scheme
✓
May/June 2025
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 0478_s25_ms_22.pdf →

Show text version of question

Question 6

Part (c)

Question 6

This pseudocode is an algorithm.

DECLARE Word : STRING DECLARE V1 : INTEGER DECLARE V2 : INTEGER DECLARE Number : INTEGER DECLARE Index : INTEGER DECLARE L1 : CHAR DECLARE L2 : CHAR DECLARE Continue : BOOLEAN INPUT Number

FOR Index 1 TO Number INPUT Word Continue TRUE V1 1 V2 LENGTH(Word) WHILE Continue = TRUE AND V1 < V2 DO L1 SUBSTRING(Word, V1, 1) L2 SUBSTRING(Word, V2, 1) IF L1 <> L2 THEN Continue FALSE ELSE

V1 V1 + 1 V2 V2 – 1 ENDIF ENDWHILE IF Continue = TRUE THEN OUTPUT "Successful" ELSE OUTPUT "NOT successful" ENDIF NEXT Index

Question 7

, ,

Part (c)

Explain how the algorithm knows when all the letters in the word have been checked so that it

can stop checking.

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

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

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

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

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

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

[3]

Question 8

, ,

Topic relevance

Why this question appears here

60% 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_s25_qp_22.pdf

Keep practising this topic