Question PSC-ARR-0013
MediumWhat will be the output of the following pseudocode?
Integer a[] = {2, 3, 2, 5, 3, 2}
Integer c = 0
for (each i from 0 to 5)
if (a[i] == 2)
c = c + 1
end if
end for
Print c
- A.
2
- B.
3
- C.
6
- D.
1
Sign up free to see the answer and a step-by-step explanation.