Why does the following program segfault?
int main() { main(); }
Even though it is a recursion that does not end and is therefore invalid by
Each function call add entires in stack and this entries will get removed from stack when function exit. Here we have recursive function call which doesn't have exit condition. So its a infinite number of function call one after another and this function never get exit and there entires never removed from the stack and it will lead to Stack overflow.