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...

why the execution starts from main function

Answer Posted / ravi joshi

As many of them have answered here, main is a special
function in C/C++ programs. The compiler does not care if
you have defined main or not, but linker does. If linker
finds main defined in the objects being linked, then the
address of main function is placed at the top of execution
stack. And automatically when loader loads the
program/process, the main function gets loaded at the top of
execution stack, and system starts execution using
__crtmain() which internally calls main() of the program/process

Is This Answer Correct ?    16 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many data structures are there in c?

1128


What is c variable?

1049


a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none

1163


What is non linear data structure in c?

1033


How can I call fortran?

1049


Explain built-in function?

1146


Is c still relevant?

1088


What is the scope of an external variable in c?

1050


How do we declare variables in c?

1071


What is the role of this pointer?

1075


Is using exit() the same as using return?

1366


Explain what are reserved words?

1108


What is the best style for code layout in c?

1102


Why void is used in c?

1020


What is function pointer c?

1121