[Ilugc] C pgm - Recursive -segmentation fault

  • From: sashok@xxxxxxxxxxxxx (S Ashok)
  • Date: Mon Sep 13 18:26:23 2004

On Mon, 13 Sep 2004, ChakravBarthi_Mohan wrote:

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

Called only 523714 times, after that segmentation fault occurs WHY?
  Running Out of Stack Space

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

    R();
}

int main()
{
    R();
}
-- 
Ashok S,
Development Engineer,
Midas Communication Technologies (P) Ltd,
Neelagarai,
Chennai.
Phone : 044 - 24492525 extn: 560
Mobile: 044 - 32914224

Other related posts: