Question PSC-ARR-0055
MediumWhat does the following pseudocode print?
Integer a[5] = {10, 20, 30, 40, 50}
Integer i, s = 0
for (each i from 4 down to 0)
s = s * 2 + a[i] / 10
end for
Print s
- A.
15
- B.
31
- C.
Sign up free to see the answer and a step-by-step explanation.