CS 159 Lab 8 True or False Exam Study Set
In an event-controlled loop we know the number of times that the actions found
inside the body of the loop will
be executed. - ANSWER F
In a counter-controlled loop we know the number of times that the actions found
inside the body of the loop will
be executed. - ANSWER T
A counter-controlled loop may execute a constant number of iterations. -
ANSWER T
It is possible for the number of times a counter-controlled loop will iterate to
depend on the value of a single
variable or expression. - ANSWER T
The number of times that the loop control expression is evaluated is one more
than the number of iterations in a
pretest loop. - ANSWER T
The for loop is usually used for counter-controlled processes. - ANSWER T
The ability to complement a logical expression is important because
programmers often consider what must
happen for a loop to terminate rather than the conditions that should keep it
going. - ANSWER T
The loop control expression is evaluated before every iteration of a pretest loop,
including the first iteration. - ANSWER T
No semi-colon is used after the loop control expression for a while loop. -
ANSWER T
The first expression in a for loop is to initialize the loop control variable. -
ANSWER T
The second expression in a for loop is the loop control expression. - ANSWER T
The third expression in a for loop is the update expression that changes the loop
control variable. - ANSWER T
In an event-controlled loop we know the number of times that the actions found
inside the body of the loop will
be executed. - ANSWER F
In a counter-controlled loop we know the number of times that the actions found
inside the body of the loop will
be executed. - ANSWER T
A counter-controlled loop may execute a constant number of iterations. -
ANSWER T
It is possible for the number of times a counter-controlled loop will iterate to
depend on the value of a single
variable or expression. - ANSWER T
The number of times that the loop control expression is evaluated is one more
than the number of iterations in a
pretest loop. - ANSWER T
The for loop is usually used for counter-controlled processes. - ANSWER T
The ability to complement a logical expression is important because
programmers often consider what must
happen for a loop to terminate rather than the conditions that should keep it
going. - ANSWER T
The loop control expression is evaluated before every iteration of a pretest loop,
including the first iteration. - ANSWER T
No semi-colon is used after the loop control expression for a while loop. -
ANSWER T
The first expression in a for loop is to initialize the loop control variable. -
ANSWER T
The second expression in a for loop is the loop control expression. - ANSWER T
The third expression in a for loop is the update expression that changes the loop
control variable. - ANSWER T