Past-paper question · 2024 May-June · Paper 23 · Q4(c)

Question 4(c) 2024 · May-June · Paper 23 · 4 marks

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

Official answer for Question 4

Part (c)

✓
One mark per mark point, max four

Question 4

✓
MP1
✓
Declare/use a variable that is set to the maximum size of the array
✓
MP2
✓
… at the start of the program
✓
MP3
✓
After line 18
✓
MP4
✓
… check that the value of the counting variable is not greater than the array maximum variable
✓
MP5
✓
… and if it is do not allow any more entries / set the value of Response to 'N' / add additional condition to UNTIL
✓
statement that checks if the counting variable is at maximum
✓
0478/23
✓
Cambridge IGCSE – Mark Scheme
✓
May/June 2024
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 0478_s24_ms_23.pdf →

Show text version of question

Question 4

Part (c)

Question 4

This pseudocode algorithm is intended to allow data for up to 50 people to be entered and stored

in a two-dimensional (2D) array. The data is their last name, first name and the city in which they live.

01 DECLARE People : ARRAY[1:50, 1:3] OF REAL 02 DECLARE Count : INTEGER 03 DECLARE Response : CHAR 04 DECLARE Continue : BOOLEAN 05 FOR I 1 TO 50 06 FOR J 1 TO 3 07 People[I, J] "" 08 NEXT J 09 NEXT I 10 Count 100 11 Continue TRUE 12 CASE OF 13 OUTPUT "Enter the last name" 14 INPUT People[Count, 1] 15 OUTPUT "Enter the first name" 16 INPUT People[Count, 2] 17 OUTPUT "Enter the city" 18 INPUT People[Count, 3] 19 OUTPUT "Do you want to enter another name (Y or N)?" 20 INPUT Response 21 IF Response = 'N' 22 THEN 23 Continue FALSE 24 ELSE 25 Count Count + 1 26 ENDIF 27 UNTIL NOT Count

Part (c)

Explain how you could alter the original corrected algorithm to make sure that the

number of elements being added to the array does not exceed the maximum size of the array (50 elements).

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

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

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

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

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

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

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

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

[4]

Question 6

Topic relevance

Why this question appears here

99% 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_s24_qp_23.pdf

Keep practising this topic