The biggest feature of C program is that all programs are assembled with functions. Main (), called the main function, is the entrance for all programs to run. Other functions are divided into two types: those with parameters and those without parameters, which are all called by the main () function or other general functions. If a function with parameters is called, the parameters are passed when the function is called.
Extended data
Main function, also called main function, is the starting point of program execution. Main is relative, just as the main tone of phonology theory is overtone, which is a function other than main in the program, catering to people's way of thinking, not a certain model. There is a master and a second time, and the execution is clear and meticulous, which can not only modularize the program but also realize a closed whole.
Program execution always starts with the main function. If there are other functions, it will return to the main function after calling other functions. Finally, the main function will end the whole program. When the program is executed, the system calls the main function.
The main function is called after the initialization of non-local objects with static storage period is completed in the program startup. Is the entry point specified by the program in the managed environment (that is, the operating system).
Baidu Encyclopedia-Main functions