The only function in C language is the main function. A complete C program has only one main function (main function). The main function can call various other functions, but other functions cannot call the main function. The C program starts execution from the main function and ends the entire program in the main function. of operation.
#The only function in C language is the main function.
(Recommended learning: C language tutorial)
Analysis:
A complete C program has and only one main function (main() function), the main function can call various other functions, but other functions cannot call the main function. The C program starts execution from the main function and ends the entire program in the main function.
Related introduction:
Main main function form:
1. The return value is int and the parameter is void:
int main(void)
This is a common one Writing method. The formal parameter is void, which means that no parameters can be passed in when it is called, so it cannot obtain command line parameters.
2. The return value is int, with two input parameters:
int main(int argc,char *argv[])
This is also the most common way of writing. The first input parameter is the number of command line parameters, and the second input parameter is the command line parameter array. Usually used to implement functions that require obtaining parameters from the command line.
The above is the detailed content of What is the only function in C language?. For more information, please follow other related articles on the PHP Chinese website!