Question PSC-FUNC-0012
MediumWhat will be the output of the following pseudocode?
Integer calls = 0
Function c(Integer n)
calls = calls + 1
if (n <= 0)
return 0
end if
return c(n - 1) + c(n - 2)
End Function
c(4)
Print calls
- A.
4
- B.
9
- C.
Sign up free to see the answer and a step-by-step explanation.