Question PSC-FUNC-0066
HardWhat will be the output of the following pseudocode?
Function s(Integer n, Integer k)
if (k == 0 or k == n)
return 1
end if
return s(n - 1, k - 1) + s(n - 1, k)
End Function
Integer total = 0, k
for (each k from 0 to 6)
total = total + s(6, k)
end for
Print total
- A.
128
- B.
64
- C.
32
- D.
21
Sign up free to see the answer and a step-by-step explanation.