Sail E0 Webinar
Question


What will be the output of the program?


#include<stdio.h>
void fun(int);
typedef int (*pf) (int, int);
int proc(pf, int, int);
int main()
{
int a=3;
fun(a);
return 0;
}
void fun(int n)
{
if(n > 0)
{
fun(--n);
printf("%d,", n);
fun(--n);
}
}
Options:
A .  0, 2, 1, 0,
B .  1, 1, 2, 0,
C .  0, 1, 0, 2,
D .  0, 1, 2, 0,
Answer: Option D



Submit Your Solution Below and Earn Points !
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers