Examveda
Examveda

What will be the output of the following C code?
#include<stdio.h>
main()
{
    int n;
    n=f1(4);
    printf("%d",n);
}
f1(int x)
{
    int b;
    if(x==1)
        return 1;
    else
        b=x*f1(x-1);
        return b;
}

A. 24

B. 4

C. 12

D. 10

Answer: Option A


This Question Belongs to C Program >> C Miscellaneous

Join The Discussion

Related Questions on C Miscellaneous