Home >Backend Development >C#.Net Tutorial >Can't the value after return be an expression?
#Can’t the value after return be an expression?
The value after return can be an expression.
return statement
1. Meaning:
return means returning from the called function to the calling function. The return can be accompanied by a Return value, this return value can be a constant, variable, or expression.
(Recommended learning: c language video tutorial)
2. Function:
End the running function and return the function value.
3. Function return value:
The calculation result indicates whether the function is executed smoothly or not (-1, 0)
The return value can be various data types, such as: int, float, double, char, a, *a (pointer), structure or class (c)
int sum(int i,int j) { return i+j; }
The above is the detailed content of Can't the value after return be an expression?. For more information, please follow other related articles on the PHP Chinese website!