Function Return Values Flashcards
Returning a value back to a caller
- your function has to indicate the type of value being returned
- ypu have to use a return statetment to indicate specific value returned
Indicating type of value to be returned
Setting the function’s return type, which is the type defined before the functions name
The return value
Specific value returned from a function
Return by value
Process when the return value is copied from the function back to the caller
Void return values
Type of value we use when the function does not need to return a value
Use of void return values
When we want to have a function that does not return a value
Return to main
When a program is executed, the operating system makes a function call to main, returns value 0 and it must return integer
Status code
The value that is returned back to the operating system telling whether the program is executed successfuly