| <<< Make ping-pong better | Index | return from a void function >>> |
Functions can have input parameters:
int max_value( int x, int y )
{
if ( x > y ) {
return x;
}
return y;
}
The return statement is the mechanism for returning a value:
return expression;
Type of the returned value has to agree with the function prototype
The calling function is free to ignore the returned value
| <<< Make ping-pong better | Index | return from a void function >>> |