Question PSC-FUNC-0018
HardWhat will be the output of the following pseudocode?
Function f(Integer n)
if (n == 0)
return 0
end if
return (n mod 2) + f(n / 2) // integer division
End Function
Print f(255) - f(256)
- A.
8
- B.
0
- C.
7
- D.
-1
Sign up free to see the answer and a step-by-step explanation.