Why infinite recursion leads to seg fault

Posted by Pqr on Stack Overflow See other posts from Stack Overflow or by Pqr
Published on 2010-06-03T10:02:39Z Indexed on 2010/06/03 10:04 UTC
Read the original article Hit count: 174

Filed under:
|
|

Why infinite recursion leads to seg fault ? Why stack overflow leads to seg fault. I am looking for detailed explanation.

int f()                                                                                                                                                      
{                                                                                                                                                            
  f();                                                                                                                                                       
}                                                                                                                                                            

int main()                                                                                                                                                   
{                                                                                                                                                            
  f();                                                                                                                                                       
}                                                                                                    

© Stack Overflow or respective owner

Related posts about c++

Related posts about c