Question PSC-ARR-0028
EasyWhat is the output of this pseudocode?
Integer a[] = {4, 9, 1, 9}, pos = -1
for (each i from 0 to 3)
if (a[i] == 9 and pos == -1)
pos = i
end if
end for
Print pos
- A.
3
- B.
-1
- C.
Sign up free to see the answer and a step-by-step explanation.