English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Is it an optional code? What is its use?

2006-11-12 03:55:40 · 3 answers · asked by Anonymous in Computers & Internet Programming & Design

3 answers

This is how you tell the C compiler where to start execution. This is not optional for a complete program. That is, the program always starts running by calling the main() function, which may call other functions in turn. We say that main() is an "entry point" for your code, a place to start execution.

2006-11-12 04:27:03 · answer #1 · answered by arbeit 4 · 0 0

main() is the function that holds whatever the code is. The compiler looks for this in order to compile the program.No, it's not optional, without it, your code will not compile/run properly.

2006-11-12 11:58:27 · answer #2 · answered by Snoopy 5 · 0 0

main function is an entry point of a C program.

2006-11-12 12:50:51 · answer #3 · answered by the_init 1 · 0 0

fedest.com, questions and answers