Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - What does int f(int x) mean?
What does int f(int x) mean?
Int f(int x) is the general form of calling function.

Int stands for type descriptor and is an integer; F represents the name of the called function, which is user-defined; Int x in parentheses is a parameter;

In a program, the function body is executed by calling a function, which is similar to subroutine calling in other languages.

In C language, the general form of function call is: function name (actual parameter table).

There is no actual parameter table when calling nonparametric functions. The parameters in the actual parameter table can be constants, variables or other structural types of data and expressions. Parameters are separated by commas.

Extended data:

C language also stipulates that the function description of the tuning function in the main tone function can be omitted under the following circumstances:

1. If the return value of the called function is an integer or a character, it can be called directly without explaining the called function. At this point, the system will automatically process the return value of the called function as an integer. This is the case where the main function of Example 8.2 is called directly without explaining the function S. ..

2. When the function definition of the tuning function appears before the tuning function, it can also be called directly in the tuning function without further explanation. For example: int max(int a, int b).

3. If the type of each function is explained in advance outside the function before all functions are defined, then the tuned function can no longer be explained in the following tonic function.

4. There is no need to explain the call to the library function, but the header file of the function must be included in front of the source file with the include command.

References:

Baidu Encyclopedia-Call Function