Chapter 6 Flashcards
What are some common functions from previous chapters?
Pow (a,b) Time(0) Rand() Srand() Main ()
What is the syntax of a function
ReturnValueType functionName (list of parameters)
{ // function body }
What does the function header specify?
The functions return value type, function name, and parameters
In a function where you want to preform operations without returning a value what’s is the return valueValueType?
Void
A function that returns a value is called a ______ _______ function
Value returning
A function that does not return a value is called a _____ function
Void
Function exits a statement when…..?
A return statement is executed
In function header do you need to declare each parameter separately?
Yes!!!!!!
Are return statements necessary for void functions?
No but you can use return; if it is helpful
To terminate the program if an invalid input is used you can use the function….
exit (int)
Where int is any integer
What is a function?
A collection of statements grouped together to preform an operation