Question PSC-BIT-0051
MediumWhat is the output of this pseudocode?
Integer x = 13, r = 0, i
for (each i from 1 to 4)
r = (r << 1) | (x & 1)
x = x >> 1
end for
Print r
- A.
14
- B.
11
- C.
Sign up free to see the answer and a step-by-step explanation.