Question PSC-BIT-0072
HardWhat is the output of this pseudocode?
Integer s = 0, i
for (each i from 1 to 16)
if ((i & (i - 1)) == 0)
s = s + i
end if
end for
Print s
- A.
31
- B.
15
- C.
Sign up free to see the answer and a step-by-step explanation.