Computer Sciences > Gate 2015 Set-2 > Recursion
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);
    return x;
}


The return value of fun(5) is __________.

Correct : a

Similar Questions

Consider the following program written in pseudo-code. Assume that x and y are integers. Count (x, y) { &nbsp; &nbsp; if (y !=1 ) { &nbsp; &nbsp; &nbsp; &n...
#606 Fill in the Blanks
Consider the following program written in pseudo-code. Assume that x and y are integers. Count (x, y) { &nbsp; &nbsp; if (y !=1 ) { &nbsp; &nbsp; &nbsp; &n...
#606 Fill in the Blanks
Consider the following program written in pseudo-code. Assume that x and y are integers. Count (x, y) { &nbsp; &nbsp; if (y !=1 ) { &nbsp; &nbsp; &nbsp; &n...
#606 Fill in the Blanks

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......