Home  >  Article  >  Backend Development  >  What is the name of the main function in C language?

What is the name of the main function in C language?

尚
Original
2020-04-23 15:13:4214252browse

What is the name of the main function in C language?

The name of the main function in C language is main. The main function is also called the main function. It is the starting point of program execution. If there are other functions, it will return to the main function after completing the calls to other functions. function, and finally the main function ends the entire program.

The specific form is as follows:

main(){ }

The content enclosed by braces { } is called the function body of the main function. This part is What the computer wants to execute.

There is a semicolon (;) after each sentence in { }. In C language, we call a sentence ending with a semicolon a C language statement. The semicolon is a statement. End sign.

A function is a group of statements that perform a task together. Every C program has at least one function, the main function main(), and all simple programs can define other additional functions.

The above is the detailed content of What is the name of the main function in C language?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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