Home > Backend Development > C#.Net Tutorial > Can't the value after return be an expression?

Can't the value after return be an expression?

angryTom
Release: 2020-02-13 13:56:24
Original
11008 people have browsed it

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;
}
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template