447 views
0 votes
0 votes
Need Explanation for this question:

int main()
{
static int i=5;
    if(--i)
    {
        printf("F=%d\n",i);
        main();
        printf("Hai\n");
        printf("%d\n",i);
    }
}
 

Output:

F=4
F=3
F=2
F=1
Hai
0
Hai
0
Hai
0
Hai
0

Please log in or register to answer this question.

Related questions

0 votes
0 votes
0 answers
1
shiva0 asked Jan 11, 2019
626 views
#include int main() { int i = 1; printf("%d %d %d\n", i++, i++, i); return 0; }
1 votes
1 votes
1 answer
4