Question PSC-BIT-0007
EasyWhat will be the output of the following pseudocode?
Integer x = 9
if (x & 1)
Print "Odd"
else
Print "Even"
end if
- A.
1
- B.
9
- C.
Show answer and explanation
Answer: C
The lowest bit of 9 (1001) is 1, so x & 1 is 1 (true): odd.