Computer Science · May / June 2023 · Paper 21 · Question 7
0478
As printed in the paper
The question as text
The flowchart represents an algorithm. START INPUT Letter INPUT Choice OUTPUT "Another Letter? (Y or N)" OUTPUT "Letter ", Letter, " is represented by ", Word[Pointer, 2] IS Choice = 'Y' ? IS Word[Pointer, 1] = Letter ? STOP Pointer 1 Pointer Pointer + 1 Yes Yes No No 7 The table represents the two-dimensional (2D) array Word[] which stores the first half of the phonetic alphabet used for radio transmission. For example, Word[10,1] is ‘J’. Index 1 2 1 A Alpha 2 B Bravo 3 C Charlie 4 D Delta 5 E Echo 6 F Foxtrot 7 G Golf 8 H Hotel 9 I India 10 J Juliet 11 K Kilo 12 L Lima 13 M Mike
Read automatically from the paper; the printed page above is exact.
Show the answer and mark scheme
7(a)[4]
One mark per correct column, max four
Pointer
Letter
Choice
OUTPUT
1
F
2
3
4
5
6
Letter F is represented by Foxtrot
Another Letter? (Y or N)
Y
1
D
2
3
4
Letter D is represented by Delta
Another Letter? (Y or N)
N
7(b)[1]
(Linear) search
7(c)[2]
One mark per mark point, max two
The algorithm would not stop… because it would not have found the item it was seekingOr
The array would run out of values after the pointer reached 13the algorithm will crash
Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.

