edited by
1,445 views
2 votes
2 votes

output of program:

void function(int);

void main() {
    
    function(3);
}

void function(int num){

    if(num>0) {
    
    function(--num);
    
    printf("%d",num);
    
    function(--num);
    
    }

}



will the argument num value be retained at all recursion levels?

edited by

4 Answers

Best answer
4 votes
4 votes

output :

$0120$

selected by
0 votes
0 votes

It might help U!!!!!!

Related questions

3 votes
3 votes
3 answers
1
Laxman Ghanchi asked May 19, 2023
1,113 views
#include<stdio.h void print(int n) { printf("Hello "); if(n++ == 0) return ; print(n); n++; } int main() { void print(); print(-4); }How many times printf execute?? And H...
0 votes
0 votes
1 answer
2
Laxman Ghanchi asked May 19, 2023
657 views
#include<stdio.h>void print(int n){ printf("Hello "); if(n++ == 0) return ; print(n); n++;}int main(){ void print(); print(-4);}
3 votes
3 votes
1 answer
3