C output type question
Q. C Programming : Consider the following program
int n(int i)
{
static int a=0;
if(i<=0) return 1;
if (i>3)
{
a=i;
return n(i-2)+2;
}
return n (i-1)+a;
}
What is the value of f(5)?- Published on 16 Jun 15a. 5
b. 10
c. 12
d. 18
ANSWER: 18