Chapter 6: Computer Science - Functions

25 July 2022
4.7 (114 reviews)
17 test answers

Unlock all answers in this set

Unlock answers (13)
question
In a function header, in addition to the name of the function, you are required to furnish ________.
answer
All of the above Answers: an identifier name for each parameter a data type for each parameter the data type of the return value
question
In a function prototype, in addition to the name of the function, you are required to furnish ________.
answer
A and C, but not B. Answers: a data type for each parameter the data type of the return value
question
A function ________ includes the statements that make up the function.
answer
Definition
question
Two or more functions may have the same name provided that ________.
answer
their parameter lists are different
question
The ________ function causes the entire program to terminate, regardless of which function or control mechanism is executing.
answer
exit ()
question
The ________ statement causes a function to end and the flow of control to move back to the point where the function call was made.
answer
return
question
A function can have zero to many parameters, and it can have ________ return value(s).
answer
Either zero or one
question
A function other than the main function is executed ________
answer
Whenever it is called
question
In a function call, in addition to the name of the function, you are required to furnish ________.
answer
an identifier name or constant for each argument
question
When more than one function has the same name they are called ________ functions.
answer
overload
question
When used as a parameter, a ________ variable allows a function to access and modify the original argument passed to it.
answer
reference
question
Breaking a program up into a set of manageable sized functions is called ________ programming.
answer
Modular
question
A void function is one that ________.
answer
returns no value
question
A ________ variable is defined inside the body of a function and is not accessible outside that function.
answer
Local
question
Functions are ideal for use in menu-drive programs. When a user selects a menu item, the program can ________ an appropriate function to carry out the user's choice.
answer
call
question
The value in ________ local variable is retained between function calls.
answer
a static
question
When a function just needs to use a copy of an argument passed to it, the argument should normally be passed ________.
answer
By value