edited by
6,573 views
0 votes
0 votes
#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);
}
}
edited by

Please log in or register to answer this question.

Related questions

950
views
1 answers
0 votes
abhinowKatore asked Jan 18, 2023
950 views
What will be the output of the following program ?answer is 8 but I am getting 5, please explain where I am wrong
1.4k
views
4 answers
0 votes
Tariq Husain Khan asked Dec 10, 2014
1,430 views
int foo(unsigned int n) { int c,x=0; while(n!=0) { if(n&01) x++; n>>=1; } return c; }
7.5k
views
1 answers
2 votes
Gangani_Son asked Dec 11, 2018
7,483 views
#include <stdio.h> void print(int n, int j){ if (j >= n) return; if (n-j > 0 && n-j >= j) printf("%d %dn", j, n-j); print(n, j+1);} int ... 4(B) 1 72 63 54 4(C) 1 72 63 5(D) 1 23 45 67 8 Answer is B. anyone can explain how?
1.6k
views
2 answers
5 votes
shekhar chauhan asked Jun 28, 2016
1,615 views
Can Someone explain either Tree or Stack method to trace out this recursion ?What is the output of this Program ?