in Programming in C edited by
589 views
1 vote
1 vote

The return value of ace(4) is
 

int ace(int a)
{

    int x=1;

    static int k=1;

    if(a==1) return x;

    for(;k<a;++k)

    x=x+ace(k)*ace(a-k);

    return x;

}



A.15

B.4

C.10

D.Error

in Programming in C edited by
589 views

2 Answers

0 votes
0 votes

4 ave

 

by
0 votes
0 votes
Legit answer is 4

 

One can try for int k=1 , the correct answer will be 15 for that particular.