Question PSC-BIT-0078
HardWhat will be printed by the following pseudocode?
Integer cnt = 0, x
for (each x from 0 to 15)
if ((x ^ (x >> 1)) == 6)
cnt = x
end if
end for
Print cnt
- A.
4
- B.
3
- C.
6
- D.
5
Sign up free to see the answer and a step-by-step explanation.