Question 5(a) 2013 · October-November · Paper 32 · 7 marks
Reveal official mark-scheme answer
Official answer for Question 5
Part (a)
Part (a)
Boolean
Show text version of question
Question 5
Part (a)
Question 5
Customer names are stored in the array Customer. For
Examiner's Use An algorithm is to be designed to perform a serial search of the array for a requested customer name.
The algorithm will use the variables shown in the table.
Part (a)
Study the table and the algorithm and fill in the gaps.
Identifier Data Type Description Customer ARRAY[100] OF STRING Array of customer names
Index INTEGER Used to index the array elements
IsFound
SearchName STRING The requested customer name
Question 13
//Serial search algorithm For Examiner's Use INPUT
IsFound ← FALSE
Index ← 1
REPEAT
IF = SearchName
THEN
IsFound ← TRUE
OUTPUT "Found at position " Index
ELSE
ENDIF
UNTIL (IsFound = TRUE) OR
IF
THEN
OUTPUT "Customer name was NOT FOUND"
ENDIF
Why this question appears here
72% assigned-topic match · Hardware › Logic gates and logic circuits
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 9691_w13_qp_32.pdf
