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

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

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

The answer for this question is in the official mark scheme: open the mark scheme.

Mark scheme 9608_w17_ms_22.pdf →

Show text version of question

Question 2

Part (a)

Question 2

A 1D array, ClassName, of type STRING contains 100 elements.

The following pseudocode represents a simple algorithm to process the array.

DECLARE SearchValue : STRING DECLARE FoundFlag : BOOLEAN DECLARE Index : INTEGER

INPUT SearchValue FoundFlag FALSE Index 1

WHILE Index < 101 AND FoundFlag = False IF ClassName[Index] = SearchValue THEN OUTPUT Index FoundFlag TRUE ENDIF Index Index + 1 ENDWHILE

IF FoundFlag = FALSE THEN OUTPUT "Not found" ENDIF

Part (a)

Describe the purpose of the algorithm.

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

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

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

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

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

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

[2]

Question 7

Topic relevance

Why this question appears here

82% assigned-topic match · Data types and structures › Data types and records

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

Keep practising this topic