[Ilugc] C pgm - Recursive -segmentation fault

  • From: Chakravarthi_Mohan@xxxxxxxxxx (Chakravarthi_Mohan)
  • Date: Mon Sep 13 17:03:44 2004



When I run this program, Recursive Function R(),

Called only 523714 times, after that segmentation fault occurs WHY?

void R()
{
    static int i =0;
    i++;
    printf("%d\n",i);

    R();
}

int main()
{
    R();
}

What is the problem here?


Regards,
Chakravarthi Mohan

************************************************************************** 
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**************************************************************************

Other related posts: