[Ilugc] C pgm - Recursive -segmentation fault
- From: praveen@xxxxxxxxxxx (Praveen)
- Date: Mon Sep 13 17:50:40 2004
Kannan_Ranganathan wrote:
Consider a case where my program does something repeatedly ..in such a case
I write a recursive program .what's the point in writing a recursive
function if it is going to exit abruptly.
If you want to do something repeatedly, your program should have been...
void R()
{
static int i =0;
i++;
printf("%d\n",i);
}
int main()
{
while(1)
R();
}
This is what a daemon is.
--
Praveen Kumar
Web :
http://myriad-zero.net
Blog :
http://blog.myriad-zero.net
Mobile : +91-98407-02060
Other related posts: