Test 2 - fill in the blanks Flashcards
a variable that is known only within the function in which it is defined is called
local variables
The _____ statement in a called function is used to pass the value of an expression back to the calling function.
return
Keyword _____ is used in a function header to indicate that a function does not return a value or to indicate that a function contains no parameters.
void
The _____ of an identifier is the portion of the program in which the identifier can be used.
scope
The three ways to return control from a called function to a caller are _____, _____, and ______.
return, return expression and encountering the closing right brace of a function
A(n) allows the compiler to check the number, types, and order of the arguments passed to a function.
function prototype
The _____ function is used to produce random numbers.
rand
The _____ function is used to set the random number seed to randomize a program.
srand
The _____ storage-class specifiers are _____ , _____ , _____ and .
auto, register, extern, static.
Variables declared in a block or in the parameter list of a function are assumed to be of storage class _____ unless specified otherwise.
auto
A non-static variable defined outside any block or function is a(n) _____ variable.
external, global
For a local variable in a function to retain its value between calls to the function, it must be declared with the _____ storage-class specifier.
static
The four possible scopes of an identifier are _____ , _____, _____and _____.
Function scope, file scope, block scope, function prototype scope.
A function that calls itself either directly or indirectly is a(n) _____ function.
recursive
A recursive function typically has two components: one that provides a means for the recursion to terminate by testing for a(n) _____ case, and one that expresses the problem as a recursive call for a slightly simpler problem than the original call.
base
Counter-controlled iteration is also known as ______ iteration because it’s known in advance how many times the loop will be executed
definite
Sentinel-controlled iteration is also known as _____ iteration because it’s not known in advance how many times the loop will be executed
indefinite
In counter-controlled iteration, a(n) _________ is used to count the number of times a group of instructions should be repeated
counter
The ______ statement, when executed in an iteration statement, causes the next iteration of the loop to be performed immediately
continue
The ______statement, when executed in an iteration statement or a switch, causes an immediate exit from the statement
break
The ______ is used to test a particular variable or expression for each of the constant integral values it may assume
switch selection statement