Question PSC-LOOP-0042
MediumWhat does the following pseudocode print?
Integer n = 1234, r = 0
while (n > 0)
r = r * 10 + n mod 10
n = n / 10
end while
Print r + 1
- A.
10
- B.
4321
- C.
Sign up free to see the answer and a step-by-step explanation.