1/4
CS 001: Module 8
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Three steps must occur in every loop
–Initialize the loop control variable
–Compare the variable to some value
–Alter the variable that controls the loop (T/F)
True
Nested loops maintain two individual loop control variables (T/F)
True
Common mistakes made by programmers
–Neglecting to initialize the loop control variable
–Neglecting to alter the loop control variable
–Using the wrong comparison with the loop control variable
–Including statements inside the loop that belong outside the loop (T/F)
True
A for loop is used when the number of iterations is known. (T/F)
True
In a do-while loop, the loop body executes at least one time because the loop control variable is not tested until after the first iteration. (T/F)
True