Chapter 6 Flashcards
The _________ is the part of a function definition that shows the function name, return type, and parameter list
header
If a function doesn’t return a value, the word _________ will appear as its return type.
void
Either a function’s _________ or its _________ must precede all calls to the function.
definition, prototype
Values that are sent into a function are called _________.
arguments
Special variables that hold copies of function arguments are called _________.
parameters
When only a copy of an argument is passed to a function, it is said to be passed by
value
A(n) _________ eliminates the need to place a function definition before all calls to the function
prototype
A(n) _________ variable is defined inside a function and is not accessible outside the
function
local
_______ variables are defined outside all functions and are accessible to any function within their scope.
global
________ variables provide an easy way to share large amounts of data among all the
functions in a program.
global
Unless you explicitly initialize global variables, they are automatically initialized to _________
0
If a function has a local variable with the same name as a global variable, only the
_________ variable can be seen by the function.
local
________ local variables retain their value between function calls.
static
The _________ statement causes a function to end immediately.
return
________ arguments are passed to parameters automatically if no argument is provided in the function call
default
When a function uses a mixture of parameters with and without default arguments, the
parameters with default arguments must be defined _________
last
The value of a default argument must be a(n) _________.
constant
When used as parameters, _________ variables allow a function to access the parameter’s
original argument
reference
Reference variables are defined like regular variables, except there is a(n) _________ in front of the name
&
Reference variables allow arguments to be passed by _________.
reference
The _________ function causes a program to terminate.
exit
Two or more functions may have the same name, as long as their _________ are different.
parameter lists
Functions should be given names that reflect their purpose.
true
Function headers are terminated with a semicolon.
false