About us
Our services
Essay topics and ideas
Custom essay writing
Flashcards and Quizzes
Tools
Thesis statement generator
Alphabetizer
Conclusion Generator
Essay Rewriter
Free plagiarism checker
Paraphrasing Tool
Read My Essay
Log in
Sign up
Science
Computer Science
Chapter 6 Function Quiz
Please enter something
FIND ESSAY
Chapter 6 Function Quiz
Valor Allen
25 July 2022
4.7
(114 reviews)
36 test answers
Unlock all answers in this set
Unlock answers
(32)
question
The _____ is the part of the function definition that shows the function name, return type, and parameter list.
answer
header
question
If a function doesn't return a value, the word ____ will appear as its return type.
answer
void
question
Either a function's ______ or its _______ must precede all calls to the function.
answer
definition, prototype
question
Values that are sent into a function are called ________.
answer
argument
question
Special variables that hold copies of function arguments are called ________.
answer
parameters
question
When only a copy of an argument is passed to a function, it is said to be passed by _______.
answer
value
question
A (n)_______ eliminates the need to place a function definition before all calls to the function.
answer
prototype
question
A (n)_____ variable is defined inside a function and is not accessible outside the function.
answer
local
question
_______ variables are defined outside all functions and are accessible to any function within their scope.
answer
global
question
_______ variables provide an easy way to share large amounts of data among all the functions in the program.
answer
global
question
If a function has a local variable with the same name as a global variable, only the _____ variable can be see by the function.
answer
local
question
______ local variables retain their value between function cells.
answer
static
question
The _____ statement causes a function to end immediately.
answer
return
question
______ arguments are passed to parameters automatically if no argument is provided in the function call.
answer
default
question
When a function uses a mixture of parameters with and without default arguments, the parameters with default arguments must be defined ____.
answer
last
question
The value of a default argument must be a (n)_____.
answer
constant
question
When used as parameters, _____ variables allow a function to access the parameter's original argument.
answer
reference
question
Reference variables are defined like regular variables, except there is a(n) __ in front of the name.
answer
&
question
Reference variables allow arguments to be passed by _____.
answer
reference
question
The ____ function causes a program to terminate.
answer
exit
question
Two or more functions may have the same name, as long as their _________ are different.
answer
parameters
question
Functions should be given names that reflect their purpose. T or F.
answer
TRUE
question
Function headers are terminated with a semicolon. T or F
answer
FALSE
question
Function prototypes are terminated with a semicolon. T or F
answer
TRUE
question
If other functions are defined before "main", the program still starts executing at function "main". T or F
answer
TRUE
question
When a function terminates, it always branches back to "main" regardless of where it is called from. T or F
answer
FALSE
question
Arguments are passed to the function parameters in the order they appear in the function call. T or F
answer
TRUE
question
The scope of the parameter is limited to the function which uses it. T or F
answer
TRUE
question
Changes to a function parameter always affect the original argument as well. T or F
answer
FALSE
question
In a function prototype, the names of the parameter variables may be left out. T or F
answer
TRUE
question
Many functions may have local variables with the same name. T or F
answer
TRUE
question
Overuse of global variables can lead to problems. T or F
answer
TRUE
question
Static local variables are not destroyed when a function returns. T or F
answer
TRUE
question
All static local variables are initialized to -1 by default. T or F
answer
FALSE
question
Initialization of static local variables only happens once, regardless of how many times the function in which they are defined is called. T or F
answer
TRUE
question
It is not possible for a function to have some parameters with default arguments and some without. T or F
answer
FALSE
Haven't found what you need?
Search for quizzes and test answers now
Please enter something
Find answers
Quizzes.studymoose.com uses cookies. By continuing you agree to our cookie policy