C Programming - Functions - Discussion

Discussion Forum : Functions - Find Output of Program (Q.No. 5)
5.
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);
    }
}
0, 2, 1, 0,
1, 1, 2, 0,
0, 1, 0, 2,
0, 1, 2, 0,
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
96 comments Page 10 of 10.

Malligadu said:   1 decade ago
Thank you kavita.

Raku said:   1 decade ago
Thanks Sree bro

Kavita said:   1 decade ago
Thanks Sree.

Parth said:   1 decade ago
Thanks sree.

Dhananjay said:   1 decade ago
Thanks sree.

Rajendra said:   1 decade ago
Thanks Sree


Post your comments here:

Your comments will be displayed after verification.