Question PSC-BIT-0044
MediumWhat will be the output of the following pseudocode?
Integer n = 45, c = 0
while (n > 0)
if (n & 1)
c = c + 1
end if
n = n >> 1
end while
Print c
- A.
5
- B.
4
- C.
Sign up free to see the answer and a step-by-step explanation.