You are here:

C/C Language

Advertisement


Question
The main() function is predefined or userdefined.
if main() is userdefined function then we can not place of main() like write is ABC() function.

Answer
Hello 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.

C

All Answers


Answers by Expert:


Ask Experts

Volunteer


Zlatko

Expertise

No longer taking questions.

Experience

No longer taking questions.

Education/Credentials
No longer taking questions.

©2012 About.com, a part of The New York Times Company. All rights reserved.