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

write a program to concatenation the string using switch case?

2098


What is the difference between far and near ?

1191


What is the difference between c and python?

1166


Does c have function or method?

993


What is the size of array float a(10)?

1140


How does struct work in c?

1082


Which control loop is recommended if you have to execute set of statements for fixed number of times?

1345


how to introdu5ce my self in serco

2003


How can my program discover the complete pathname to the executable from which it was invoked?

1072


A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile

1091


What are pointers in C? Give an example where to illustrate their significance.

1225


Why can’t constant values be used to define an array’s initial size?

1374


what is a constant pointer in C

1157


What are the features of the c language?

1082


Explain how do I determine whether a character is numeric, alphabetic, and so on?

1130