why does the execution of a c++ program start with main()???
Answer Posted / sujith
Typically all programs that is written using C or C++ have
a global header called C Runtime headers. This is inserted
to the beginning of programs. So when you start the program
the function that is called always is, _CRTMain(). This
function will call the main function. Why every function to
start with main? Well, it is not true that all functions
should start with main. There are ways to call a user
defined function before main using #pragma starup etc.
Still mostly the entry point for all functions are main.
The reason why it is given like that is, it is essential
that _CRTMain has to give control to the user defined
functions through some way. Main is that function, and why
it is named as main is because that is the "main" function
which _CRTMain calls.
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
Describe the My Computer and My Documents folders; identify the elements that are present in every Window.
how can u do connectivity in c++ language? plz send me connectivity code in c++ ?
What are the components of stl?
Describe how to safeguard a system through acquisition of an antivirus Program and systematic backup.
Is stl part of c++ standard?
When did c++ add stl?
Explain stl.
a program using one dimensional array that searches a number if it is found on the list of given input numbers given by the user and locate its exact location in the list.
What is stl stack?
totoo po ba ang manga aliens!
Name the different types of stl containers.
how to use C++?
How is stl different from c++ standard library?
Is stl open source?
What is the use of stl?