#C language stipulates that the type of function return value is determined by the type defined in the function header. The function return value should be consistent with the type defined in the header. If it is inconsistent, the return value will be automatically converted to the type defined in the function header. If no type is defined, it defaults to int type.
Recommended: "c Language Tutorial"
That is to say, what type is your function and what type is the return value.
For example:
Function definition int fun(int a,char b)
The return value is an integer
Function definition int *fun(int a )
The return value is a pointer whose base type is an integer
Function definition void fun(int a)
No return value
More programming related For content, please pay attention to the Introduction to Programming column on the php Chinese website!
The above is the detailed content of C language stipulates that what determines the type of function return value?. For more information, please follow other related articles on the PHP Chinese website!