R
ramkumar2579
Hai, i am newbie to C , i compiled the following code and ran it in
GDB, with the break point at main.
#include <stdio.h>
int main()
{
static int i=0;
if (10 == i)
return ;
i++;
main();
printf("%d\n", i );
}
Whenever main is being called recursively , i did a "backstrace' , but
instead of showing many frames of main, i always shows only one frame
of main().. WHY?
GDB, with the break point at main.
#include <stdio.h>
int main()
{
static int i=0;
if (10 == i)
return ;
i++;
main();
printf("%d\n", i );
}
Whenever main is being called recursively , i did a "backstrace' , but
instead of showing many frames of main, i always shows only one frame
of main().. WHY?