[Solved] How recursion works in this code? [duplicate]


can you try the following piece of code.

#include<stdio.h> 
count(int);  
int  main() 
{ 
    int x=4; 
    count(x); 
    return 0; 
} 

int count(int n) 
{ 
    if(n>0) 
    {  
        printf("%d",n); 
        return count(n-1);
    }
    else
    {
        printf("%d",n); 
        return n; 
    } 
} 

4

solved How recursion works in this code? [duplicate]