##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# return statement

From cppreference.com
< c‎ | language

Terminates current function and returns specified value to the caller function.

### [edit] Syntax

`return` expression | (1) |
`return` | (2) |

### [edit] Explanation

The first version evaluates the expression, terminates the current function and returns the result of the expression to the caller function. The resulting type of the expression must be convertible to function return type.

The second version terminates the current function. Only valid if the function return type is void.

### [edit] Keywords

`return`

### [edit] Example

| This section is incomplete Reason: no example

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=c/language/return&oldid=48940"
Category:

- Todo no example