In C language who calls the main() function? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

In C language who calls the main() function?

I have been frequently coming accross people asking this question to which other people respond Operating System calls the main() function which is WRONG!

26th Feb 2017, 8:43 AM
Nishant Amoli
Nishant Amoli - avatar
2 Answers
+ 2
The right answer is as soon as the program's exe file is loaded to RAM a stub is created and the OS gives the CLR to that stub which then calls the main() function.Therefore it's incorrect to say that OS calls main (). Hope it will help in your technical interviews ☺
26th Feb 2017, 8:47 AM
Nishant Amoli
Nishant Amoli - avatar
0
🤔🤔🙄😱
31st Mar 2018, 6:38 AM
Abhishek Rawat
Abhishek Rawat - avatar