Where is the main function located in the program?

藏色散人
Release: 2020-05-07 15:27:34
Original
8011 people have browsed it

Where is the main function located in the program?

Where is the main function located in the program?

The main function must be located after the library function called by the system. The main function, also known as the main function, is the starting point of program execution. Main is relative, just like the overtones of phonetic theory. Overtones are other functions in the program except main, which cater to people's way of thinking. Generative rather than inevitable patterns.

Recommendation: "c Language Tutorial"

This question is indeed about choosing b. Many people choose c because it is a partial generalization. If c is correct, it should Put it this way: the main function is located anywhere after the library function called by the system, which is correct.

Where is the main function located in the program?

Extended information:

In C language, a program, no matter complex or simple, is generally a "function"; this function is called It is the "main() function", that is, the "main function". For example, if there is a "cooking" program, then the "cooking" process is the "main function". In the main function, depending on the situation, you may also need to call sub-functions such as "buying vegetables, cutting vegetables, cooking vegetables".

The main function must exist in most programs, but there are still exceptions. For example, in Windows programming, you can write a dynamic link library (dll) module, which is code that can be used by other Windows programs. Since the DLL module is not an independent program, there is no need for a main function. As another example, programs used in professional environments—such as control chips in robots—may not require a main function.

The above is the detailed content of Where is the main function located in the program?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!