Past-paper question · 2019 May-June · Paper 23 · Q1(b)(ii)

Question 1(b)(ii) 2019 · May-June · Paper 23 · 6 marks

Original past-paper question for 1(B)(II)
Original past-paper question for 1(B)(II)
Original past-paper question for 1(B)(II)
Original past-paper question for 1(B)(II)
Reveal official mark-scheme answer Official mark-scheme answer for 1(B)(II)

Official answer for Question 1

Part (b)

(ii)

Question 5

✓
Variable
✓
Data type
✓
MeltingPoint
✓
REAL
✓
Soluble
✓
BOOLEAN
✓
Attempt
✓
INTEGER
✓
Version
✓
CHAR
✓
ProductID
✓
STRING
✓
One mark per data type
✓
Question
✓
Answer
✓
Marks

Mark scheme 9608_s19_ms_23.pdf →

Show text version of question

Question 1

Part (b)

(ii)

Question 1

The following pseudocode searches for the longest run of identical characters in the array

Message.

DECLARE Message : ARRAY[1:100] OF CHAR

PROCEDURE Search()

DECLARE Index : INTEGER DECLARE ThisChar : CHAR DECLARE ThisRun : INTEGER DECLARE LongRun : INTEGER

ThisChar Message[1] ThisRun 1 LongRun 1

FOR Index 2 TO 100

IF Message[Index] = ThisChar THEN ThisRun ThisRun + 1 ELSE ThisChar Message[Index] IF ThisRun > LongRun THEN LongRun ThisRun ENDIF ThisRun 1 ENDIF

ENDFOR

OUTPUT "The longest run was " , LongRun

ENDPROCEDURE

Question 3

(ii)

Programming languages support different data types.

Give an appropriate data type for the following variables from part (b)(i).

Variable Data type MeltingPoint

Soluble

Attempt

Version

ProductID

[5]

Question 5

Topic relevance

Why this question appears here

75% assigned-topic match · Programming

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 9608_s19_qp_23.pdf

Keep practising this topic