Choose the correct Pseudo code to store names in an array and display a name.
Answer options
A
BEGIN
B
INPUT name
C
DECLARE name [20]
D
END
E
PRINT name
F
BEGIN
G
INPUT name
H
DECLARE name [20]
I
PRINT name
J
END
K
BEGIN
L
INPUT name
M
PRINT name
N
DECLARE name [20]
O
END
P
BEGIN
Q
DECLARE name [20]
R
INPUT name
S
PRINT name
T
END
Correct answer: BEGIN, DECLARE name [20], INPUT name, PRINT name, END
Explanation
Correct pseudocode must DECLARE the array before use, then INPUT data into it, then PRINT. Block D (indices 15-19) follows this order: BEGIN, DECLARE name[20], INPUT name, PRINT name, END. Block A (0-4) has END before PRINT; Block B (5-9) declares after INPUT; Block C (10-14) prints before declaring.