Computer Science - Chapter 6

Ace your homework & exams now with Quizwiz!

The value in _______ local variable is retained between function calls.

a static

A(n) _________ is information that is passed to a function, and a(n) _________ is a special variable that receives and holds that information.

argument, parameter

When a function just needs to use a copy of an argument passed to it, the argument should be passed

by value

Functions are ideal for use in menu-drive programs. When a user selects a menu item, the program can ________ the appropriate function to carry out the user's choice.

call

A function is executed when it is

called

A function __________ contains the statements that make up the function.

definition

A ___________ is a program module whose purpose is to test other modules by calling them.

driver

The ________ function causes a program to terminate, regardless of which function or control mechanism is executing.

exit()

When large amounts of data must be accessible to all functions in a program, a _________ variable is an easy alternative.

global

Numeric global variables are __________ by default and numeric local variables are __________ by default.

initialized to zero, not initialized

When more than one function has the same name they are called

overloaded functions

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

passed by value

When a function needs access to an original argument passed to it, for example in order to change its value, the argument needs to be

passed into a reference parameter

If a function is called more than once in a program, the values stored in the function's local variables do not ________ between function calls.

persist

A function __________ eliminates the need to place a function definition before all calls to the function.

prototype

Default arguments are normally specified in the function

prototype

When used as parameters, _________ variables allow a function to access and modify the parameter's original argument.

reference

A void function is one that

returns no value

A __________ is a dummy function that is called instead of the actual function it represents, to test that the call to and return from the function are working correctly.

stub

In a function header line, you are required to furnish

the name of the function the variable name(s) of any parameters the data type of the return value the data type(s) of any parameters

A static local variable is one

whose value is retained between function calls

Overloaded functions are functions.

with the same name but different parameter lists

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

Default

True/False: A function's return type must be the same as the function's parameters.

False

True/False: When a function is called, flow of control moves to the function's prototype.

False

True/False: You must furnish at least one argument with a function call.

False

True/False: It is possible for a function to have some parameters with default arguments and some without.

True

True/False: One reason for using functions is to break programs into manageable units, or modules.

True


Related study sets

Management application questions

View Set

Series 7 - Special Securities and Financial Listings

View Set