NEW
Font size
WorksheetsThe Coming Apocalypse Test (Coding I Chapter 7 SG)
Total questions: 25
Worksheet time: 13mins
True or False?
A looping condition tells the computer when to exit a loop.
True
False
True or False?
The difference between pretest and posttest loops is that in posttest loops the condition is not evaluated with each iteration of the loop, whereas in pretest loops it is.
True
False
True or False?
Not every problem requires a loop in it’s solution.
True
False
True or False?
A loop condition must result in either a true of false answer only.
True
False
True or False?
With very rare exceptions, every loop has a loop condition and a loop body.
True
False
True or False?
Values used to end loops are sometimes called sentile values.
True
False
True or False?
In flowcharts, the parallelogram is the selection/repetition symbol.
True
False
True or False?
When coding the while statement, you may include braces around the loop body even when it contained only one statement.
True
False
True or False?
The loop condition of the while statement cannot contain arithmetic operators.
True
False
True or False?
A loop that processes it’s instructions indefinitely is referred to an an infinite loop.
True
False
True or False?
An accumulator is always incremented by a constant value, whereas a counter variable is incremented by a value that varies.
True
False
True or False?
The second argument in the for clause usually contains an expression that updates the counter variable specified in the initialization argument.
True
False
True or False?
In the for statement, if the loop body contains more than one statement, the statements must be entered as a statement block.
True
False
True or False?
The update argument in the for clause usually contains an expression that updates the counter variable specified in the initialization argument.
True
False
True or False?
A programmer must provide all three arguments in a for clause
True
False
In a ___ loop, the evaluation occurs after the instructions within the loop are processed.
for
pretest
posttest
while
Values that are used to end loops are referred to as ___ values.
iterator
sentinel
break
accumulator
In a loop, the ___ read is used to prepare or set up the loop.
sentinel
accumulator
priming
initialization
In a flowchart, the repetition symbol has ___ flowline(s) leading out of the symbol.
one
two
three
four
When coding the while statement in C++, the loop condition must be a(n) ___ expression.
arithmetic
relational
logical
Boolean
You create a statement block by enclosing the statements in a set of ___.
()
[]
{}
<>
Usually, you can stop a program that contains an infinite loop by press___.
Ctrl+e
Ctrl+c
Ctrl+s
Ctrl+x
A(n) ___ is a numeric variable variable used for counting something, such as the number of employees paid in a week.
sentinel
iterator
counter
accumulator
The most common use for the for statement is to code protest loops whose processing is controlled by a(n) ___.
flag
counter
accumulator
sentinel
The for statement begins with the for clause, which contains___ arguments separated by semicolons.
two
three
four
many
