closed by
300 views
1 votes
1 votes
closed as a duplicate of: GATE CSE 2015 Set 2 | Question: 11

Explain how to evaluate it

how to evaluate recursion within loop

Consider the following C function:
int fun (int n)
{
int x=1, k;
if (n= =1) return x;
for (k=1; k < n; ++k)
x = x + fun(k) * fun(n – k);
}
The return value of fun(5) is __________.
(a) 0 (b) 26
(c) 51 (d) 71

closed by

Related questions

1 votes
1 votes
1 answer
1
0 votes
0 votes
1 answer
2