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
How many data structures are there in c?
What is c variable?
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
What is non linear data structure in c?
How can I call fortran?
Explain built-in function?
Is c still relevant?
What is the scope of an external variable in c?
How do we declare variables in c?
What is the role of this pointer?
Is using exit() the same as using return?
Explain what are reserved words?
What is the best style for code layout in c?
Why void is used in c?
What is function pointer c?