GeeksforGeeks » C/C++ Programming Questions
Recursion of main()
(2 posts)-
#include<stdio.h> #include<conio.h> static int i; int main() { if(i==5) printf("\n thanks..."); i++; return (i=main()); }When i run this program it is showing the output as thanks... But it is still in the output window and i am not able to get back to the program window.. why is it so ? Can you explain please..
-
Because there is no recursion termination condition
Reply
You must log in to post.