C/C Language
Expert: Zlatko - 6/30/2011
QuestionThe main() function is predefined or userdefined.
if main() is userdefined function then we can not place of main() like write is ABC() function.
AnswerHello Arun
The main function is one which you define. In C, the word "define" means to provide an implementation. This means that the main function is one which you must write. In some cases, the main function will be provided for you but these are special cases like when you are using some framework. Even in the framework, there is the main function, but you do not see it.
The main function is the function which the compiler sets as the entry point to your program. You cannot ask for a different entry point so you cannot have the program start in function ABC.
I hope that makes things clear.