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

What are the two forms of #include directive?

1218


Ow can I insert or delete a line (or record) in the middle of a file?

1047


What are the disadvantages of external storage class?

1103


Can we use any name in place of argv and argc as command line arguments?

1125


How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?

1082


what is the role you expect in software industry?

2197


What is pointer and structure in c?

1275


What are unions in c?

1083


What is zero based addressing?

1233


What is meant by initialization and how we initialize a variable?

1090


What is formal argument?

1189


Which header file should you include if you are to develop a function which can accept variable number of arguments?

1458


What is else if ladder?

1075


How can you convert integers to binary or hexadecimal?

1072


a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none

1326