Question PSC-BIT-0063
HardWhat does the following pseudocode print?
Integer a = 29, b = 15
Integer s = a, carry = b
while (carry != 0)
Integer t = s & carry
s = s ^ carry
carry = t << 1
end while
Print s
- A.
14
- B.
40
- C.
Sign up free to see the answer and a step-by-step explanation.