Question PSC-ARR-0064
HardWhat is the output of this pseudocode?
Integer a[5] = {3, 1, 4, 1, 5}
Integer b[5], i, j
for (each i from 0 to 4)
b[i] = 0
for (each j from 0 to 4)
if (a[j] < a[i]) b[i] = b[i] + 1 end if
end for
end for
Print b[0], b[2], b[4]
- A.
1 2 3
- B.
2 4 4
- C.
Sign up free to see the answer and a step-by-step explanation.