Examveda

What will be the output of the following C code?
#include<stdio.h>
int main()
{
    int n=10;
    int f(int n);
    printf("%d",f(n));
}
int f(int n)
{
    if(n>0)
        return(n+f(n-2));
}

A. 10

B. 80

C. 30

D. Error

Answer: Option C


This Question Belongs to C Program >> C Miscellaneous

Join The Discussion

Related Questions on C Miscellaneous