What will be the output of the following C code? [code]#include<stdio.h> main() { int n,i; n=f(6); printf("%d",n); } f(int

What will be the output of the following C code?
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
 

Tìm kiếm

Back
Top