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
Explain stl.
How connect plc and pc through software
What does stl mean in slang?
In what scenario does the Logical file and Physical file being used?
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.
Can we use stl in coding interviews?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.
what is template and type convertion
How do I convert a stl file?
Who created stl?
How do you convert stl to steps?
What is a stl vector?
To modify an, existing worksheet. What steps are involved for: 1. Inserting and deleting rows and columns. 2. Printing cell formulas 3Jld displayed values 3. Using the page setup command
What are the various types of stl containers?
Why should a c++ programmer be interested in stl?