COP1000C Quiz#5 Multiple Choice
Questions and Answers
Initialize the loop control variable ✔✔The first step in a while loop is typically to ____.
The entire loop body must execute ✔✔Once your logic enters the body of
...
COP1000C Quiz#5 Multiple Choice
Questions and Answers
Initialize the loop control variable ✔✔The first step in a while loop is typically to ____.
The entire loop body must execute ✔✔Once your logic enters the body of a structured loop, ____.
Sentinel value ✔✔Use a counter or a(n) ____ to control a loop's repetitions.
Definite ✔✔A(n) ____ loop executes a predetermined number of times.
Incrementing ✔✔Many loop control variable values are altered by ____ or adding to them.
Counter ✔✔A(n) ____ is any numeric variable you use to count the number of times an event has
occurred.
Nested ✔✔A loop within another loop is known as a(n) ____ loop.
Outer ✔✔When one loop appears inside another, the loop that contains the other loop is called the
____ loop.
Loop control variable ✔✔Usually, when you create nested loops, each loop has its own ____.
Include statements inside the loop that belong outside the loop ✔✔A mistake programmers often
make with loops is that they ____.
Neglect to initialize the loop control variable prior to entering the loop body ✔✔A mistake
programmers often make with loops is that they ____.
Operands ✔✔A comparison is correct only when the correct ____ and operator are used.
Elegant ✔✔Programmers use the term ____ to describe programs that are well designed and easy
to understand and maintain.
Definite ✔✔You usually use the for loop with ____ loops.
For ✔✔The ____ loop provides three actions in one compact statement.
Step ✔✔The amount by which a for loop control variable changes is often called a ____ value.
For ✔✔The ____ loop is particularly useful when processing arrays.
Pretest loop ✔✔In a ____, the loop body might never execute because the question controlling the
loop might be false the first time it is asked.
Posttest loop ✔✔In a ____, the loop body executes at least one time because the loop control
variable is not tested until after one iteration.
Accumulator ✔✔A(n) ____ is very similar to a counter that you use to count loop iterations, except
that you usually add a value other than one to this type of variable.
Summary reports ✔✔Business reports that list only totals, with no individual item details, are
called ____.
Defensive programing ✔✔____ is a technique with which you try to prepare for all possible errors
before they occur.
Validate data ✔✔Loops are frequently used to ____; that is, to make sure it is meaningful and
useful.
GIGO ✔✔Programmers employ the acronym ____ to mean that if your input is incorrect, your
output is worthless.
Forcing ✔✔____ a data item means
[Show More]