Saturday, October 24, 2009

Recursive Main function

You can't see this program anywhere. Because this program created by me. Have you
try recursive main function? you can make main function recursive(Recursive: a
function call itself). Here is the simple program with recursive main function

int i=0;
int main()
{
if(i<2)
{
i++;
printf("%d\n",main());
}
return i;
}
i call the main function inside the main function(recursive).
Output:
2
2

0 comments:

Post a Comment