Home >Backend Development >C#.Net Tutorial >What is the smallest unit of source program in C language?
What is the smallest unit of C language source program?
The smallest unit of C language source program isfunction.
Recommended learning: C language video tutorial
C program is composed of functions. Function is the basic unit of C program. There is only one in a C source program. main() function, in addition to the main function, there can be several other functions, each function implements a specific operation.
Therefore, function is the basic unit of C program.
A function consists of two parts:
The description part of the function. Including function name, function type, function attributes, function parameter (formal parameter) name, formal parameter type.
The function body, that is, the content in { }, generally includes: The structure of each function in the variable definition execution part is as follows:
函数名() { 语句; }
The definition of the function is relatively independent, and the main function can be in other The definition of the function can be before or after it, but the execution of the program always starts from the main function.
The above is the detailed content of What is the smallest unit of source program in C language?. For more information, please follow other related articles on the PHP Chinese website!