When only a copy of an argument is passed to a function, it is said to be passed by ______
Value
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
The _______ statement causes a function to end immediately
How do you return a value from a function?
Add a return statement
Where do you define parameter values?
Within the parentheses of a function
Values that are sent into a function are called ______.
Arguments
The ______ is the part of a function that shows the function name, return type, and parameter list.
Function Header
Special variables that hold copies of function arguments are called _______.
Formal parameters
A(n) ______ eliminates the need to place a function definition before all calls to the function.
Either a function’s ______ or it’s ______ must precede all calls to the function
Prototype or Definition
When a function accepts multiple arguments, does it matter in what order the arguments are passed?
Yes, it must follow the order of the parameter list
Give an example where passing an argument by reference would be useful.
This is useful in creating a function to modify the actual value of the argument passed. When the function ends, the new value will be saved
If you are writing a function that accepts an argument and you want to make sure the function cannot change the value of the argument, what do you do?
______ variables provide an easy way to share large amounts of data among all the functions in a program
External (global?)
What is the advantage of breaking your application’s code into several small procedures?
It shortens the lines of code you have to write and you can use the same functions for different things
Unless you explicitly initialize global variables, they are automatically initialized to ______.
0 or NULL
What is the difference between an argument and a parameter value
Arguments are the literal values passed to a function when a function is called. Parameters are copies of values included in the function declaration
How would a static local variable be useful?
you can use static variables when you want to keep track of something or hold large data within the scope
_______ local variables retain their value between function calls.
Static
The ________ function causes a program to terminate.
exit()
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
Why do local variables lose their values between calls to the function in which they are defined?
They are defined within a their own scope. when the function ends, the scope ends, and all new data is lost unless stored elsewhere
________ arguments are passed to parameters automatically if no argument is provided in the function call.
Reference variables allow arguments to be passed by ___________.
Their location in memory