What is the value returned by the recursive function ackermann(2,3) ? int…
TPSC Computer/IT Posts 2026
What is the value returned by the recursive function ackermann(2,3) ?
int ackermann(int i, int j){
if(i == 0) return 2*j;
else if (j == 1) return 2;
else return ackermann(i-1, ackermann(i, j-1)) ;
}- A.
16
- B.
20
- C.
25
- D.
30
Attempted by 346 students.
Sign up free to check your answer
Sign up freeLoading lesson…

