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 C program: #include&lt;stdio.h&gt; int r(){ &nbsp; &nbsp; int static num=7; &nbsp; &nbsp; return num--; } int main() { &nbsp; &nbsp; for...
#239 MCQ
Consider the following C program: void convert(int n) { &nbsp; &nbsp; if (n < 0) &nbsp; &nbsp; printf(β€œ % d”, n); &nbsp; &nbsp; else { &nbs...
#241 MCQ
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......