exit(0) in C:
What is the output of below C program.
static int i = 10;
printf("%d\n", i ) ;
infinite loop and crash due to stack over flow.
compile time error.
It prints 10, 11. since i is a static variable which will be created only once, it will reach 11 on second iteration. So it will break the recursion and stops after printing 10, 11.
Back To Top