Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Whether there can be main inside another main?If so how does
it work?

Answer Posted / nilanjan

Surely. . It will just act like a recursive version of
main(), which will run infinite times if there is no
limiting condition specified.

Sample:

#include <stdio.h>

int main()
{
int static i = 0;

printf("\nFile is too big.");

while(i == 0)
{
i++;
main();
}
return 0;
}

Is This Answer Correct ?    21 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is data structure in c programming?

1079


c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above

1260


The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none

1251


Is null equal to 0 in sql?

1149


What is difference between static and global variable in c?

1055


Explain how can a program be made to print the name of a source file where an error occurs?

1197


Describe newline escape sequence with a sample program?

1121


What is the use of function overloading in C?

1173


Is anything faster than c?

1014


What will be your course of action for a push operation?

1112


How many keywords (reserve words) are in c?

1142


Can a void pointer point to a function?

1020


Explain what are preprocessor directives?

1067


What is main () in c language?

1133


what is the difference between 123 and 0123 in c?

1205