Examveda
Examveda

How many times is 'a' printed when the following C code is executed?
#include<stdio.h>
main()
{
    int a;
    a=f1(10);
    printf("%d",a);
}
f1(int b)
{
    if(b==0)
        return 0;
    else
    {
        printf("a");
        f1(b--);
    }
}

A. 9 times

B. 10 times

C. 0 times

D. Infinite number of times

Answer: Option D


This Question Belongs to C Program >> C Miscellaneous

Join The Discussion

Related Questions on C Miscellaneous