Question PSC-BIT-0019
HardWhat will be the output of the following pseudocode?
Integer x = 13, y = 0, i = 0
while (x > 0)
if (x & 1)
y = y + (1 << i)
end if
x = x >> 2
i = i + 1
end while
Print y
- A.
3
- B.
7
- C.
Sign up free to see the answer and a step-by-step explanation.