Click here to Skip to main content
15,901,283 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
is the main() in c is user defined or predefined function?
Posted

main is the entry_point of an executable.

read detail about main in this link
 
Share this answer
 
By the language point of view, it is the function that the program start-up code calls after global initialization finished, so it is "user defined".

Whether it is provided by the user itself, into its own source file, or linked from some other library (like MFC, for example) depends on what environment the user is working with.

The question seems formulated as a (sort of) trap, since it does not define what "user" means.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900