Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

91. When the scope resolution operator is used before a variable name, the compi

ID: 3627408 • Letter: 9

Question

91. When the scope resolution operator is used before a variable name, the compiler is instructed to use a(n) ____ variable.
a. integer c. local
b. global d. character


____ 92. Smaller programs containing a few functions should ____ contain global variables.
a. never c. usually
b. almost never d. always


____ 93. The time dimension of a variable’s scope is referred to as the variable’s ____.
a. execution time c. lifetime
b. compile time d. processing time


____ 94. A local variable that is declared as ____ causes the program to keep the variable and its latest value, even when the function that declared it is finished executing.
a. auto c. extern
b. static d. register


____ 95. Once a global variable is created, it exists until ____.
a. control is returned to the calling function
b. the program in which it is declared is finished executing
c. control is returned to the called function
d. the computer is turned off


____ 96. The misuse of globals does not apply to ____, which typically are global.
a. arguments c. function prototypes
b. return values d. local variables


____ 97. If a(n) ____ technique is not used, rand() will always produce the same series of random numbers.
a. randomization c. seeding
b. optimizing d. efficient


____ 98. The ____ class provides a set of methods that include easy insertion and removal of characters from a string.
a. char c. exception
b. ISO d. string


____ 99. Pressing the Enter key at the terminal generates a newline character, ‘ ’, which is interpreted by getline() as ____.
a. the end of data input c. the end-of-line entry
b. the end of a block of data d. a keyboard error


____ 100. If the optional third argument is omitted when getline() is called, the default terminating character is ____.
a. not defined c. the newline (‘ ’) character
b. the right brace (}) d. the extraction (>>) operator

Explanation / Answer

91. When the scope resolution operator is used before a variable name, the compiler is instructed to use a(n) ____ variable.
b. global


____ 92. Smaller programs containing a few functions should ____ contain global variables.
usually

____ 93. The time dimension of a variable’s scope is referred to as the variable’s ____.
lifetime



____ 94. A local variable that is declared as ____ causes the program to keep the variable and its latest value, even when the function that declared it is finished executing.
b. static


____ 95. Once a global variable is created, it exists until ____.
c. control is returned to the called function


____ 96. The misuse of globals does not apply to ____, which typically are global.
a. arguments


____ 97. If a(n) ____ technique is not used, rand() will always produce the same series of random numbers.
c. seeding

____ 98. The ____ class provides a set of methods that include easy insertion and removal of characters from a string.
d. string


____ 99. Pressing the Enter key at the terminal generates a newline character, ‘ ’, which is interpreted by getline() as ____.
c. the end-of-line entry


____ 100. If the optional third argument is omitted when getline() is called, the default terminating character is c. the newline (‘ ’) character