Question PSC-BIT-0047
MediumWhat will be printed by the following pseudocode?
Integer x = 0, i
for (each i from 0 to 4)
if (i mod 2 == 0)
x = x | (1 << i)
end if
end for
Print x
- A.
31
- B.
15
- C.
Sign up free to see the answer and a step-by-step explanation.