Examveda
Examveda

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

A. ++++2

B. +++++2

C. +++++

D. 2

Answer: Option A


This Question Belongs to C Program >> C Miscellaneous

Join The Discussion

Related Questions on C Miscellaneous