Question PSC-ARR-0023
EasyWhat is the output of this pseudocode?
Integer a[] = {1, 5, 3, 7, 9}, count = 0
for (each i from 0 to 4)
if (a[i] > 4)
count = count + 1
end if
end for
Print count
- A.
2
- B.
21
- C.
Show answer and explanation
Answer: C
5, 7 and 9 are greater than 4.