Professional Documents
Culture Documents
a.
b. Program components in C++ are called __function______ and _classes_______.
c. A variable that is known only within the function in which it is defined is called a(n)
___local variable_____.
d. The _return_______ statement in a called function passes the value of an expression back to
the calling function.
e. The keyword ____void____ is used in a function header to indicate that a function does not
f. The __scope______ of an identifier is the portion of the program in which the identifier can
be used.
g. The three ways to return control from a called function to a caller are ___return_____,
__return function______ and ____encounter the closing right brace of a function ____.
h. A(n)___function prototype_____ allows the compiler to check the number, types and order of the
arguments passed to a function.
j. Function ___stand_____ is used to set the random number seed to randomize a program.
k. The storage-class specifiers are mutable, __auto, register, extern, and static
o. For a local variable in a function to retain its value between calls to the function, it must
be declared with the _static_______ storage-class specifier.
p. The six possible scopes of an identifier are function scope, file scope, block scope,
function-prototype scope, class scope, namespace and scope.
q. A function that calls itself either directly or indirectly (i.e., through another function) is
a(n) ___recursive._____ function.
r. A recursive function typically has two components: One that provides a means for the
recursion to terminate by testing for a(n) ____ base.____ case and one that expresses the
problem as a recursive call for a slightly simpler problem than the original call.
s. In C++, it is possible to have various functions with the same name that operate on
different types or numbers of arguments. This is called function __overloading______.
t. The ___unary scope resolution operator (::)._____ enables access to a global variable with the
same name as a variable in
the current scope.
Chapter #07
b. The elements of an array are related by the fact that they have the same
___name_____ and ___type________.
True/false
Ans.( False.) Individual elements of an array are passed by value. If the entire
array is passed to a function, then any modifications will be reflected in
the original.