Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - It is [] that determines the type of function return value in C language.
It is [] that determines the type of function return value in C language.
In C language, the type of function return value is determined by the type specified in the function header when defining the function.

In C language, a standard function definition statement block must contain the type identifier of the function return value, the function name, the type and quantity of formal parameters, the function body and the return value expression. If the function return value type is void (that is, no return value).

Example of function definition (where int is the function return value type):

int fun(int a,int b){

return a & gtb? A: b;

}

Extended data

Examples of function types in C language;

1, void empty type, indicating that the function has no return value;

2.Intet shaping, which means that the function returns the integer value of int;

3. Double? Double precision, the function returns a double precision value;

4, char string, function return string;

5. Long integer, the function returns a long integer value;