Category 1
Category 2
Category 3
Category 4
Category 5
100

When only a copy of an argument is passed to a function, it is said to be passed by ______

Value

100

A(n) _______ variable is defined inside a function and is not accessible outside the function

Local

100

_______ variables are defined outside all functions and are accessible to any function within their scope

Global

100

The _______ statement causes a function to end immediately

Return
100

How do you return a value from a function?

Add a return statement

200

Where do you define parameter values?

Within the parentheses of a function

200

Values that are sent into a function are called ______.

Arguments

200

The ______ is the part of a function that shows the function name, return type, and parameter list.

Function Header

200

Special variables that hold copies of function arguments are called _______.

Formal parameters

200

A(n) ______ eliminates the need to place a function definition before all calls to the function.

function declaration / prototype
300

Either a function’s ______ or it’s ______ must precede all calls to the function

Prototype or Definition

300

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

300

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

300

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?

Pass it by value rather than reference
300

______ variables provide an easy way to share large amounts of data among all the functions in a program

External (global?)

400

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

400

Unless you explicitly initialize global variables, they are automatically initialized to ______.

0 or NULL

400

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

400

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

400

 _______ local variables retain their value between function calls.

Static

500

The ________ function causes a program to terminate.

exit()

500

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

500

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

500

________ arguments are passed to parameters automatically if no argument is provided in the function call.

Default
500

Reference variables allow arguments to be passed by ___________.

Their location in memory

M
e
n
u