Answer the following statements true (T) or false (F)
1. A while loop may have a semicolon after the test expression and before the body of the loop, but it is not required.
2. A while loop is somewhat limited, because the counter can only count up, not down.
3. An initialization expression may be omitted from the for loop if no initialization is required.
4. When a loop is nested inside another loop, the outer loop goes through all its iterations for each iteration of the inner loop.
5. A while loop is somewhat limited because the counter can only be incremented or decremented by one each time through the loop.
1. FALSE
2. FALSE
3. TRUE
4. FALSE
5. FALSE
Computer Science & Information Technology
You might also like to view...
Which of the following is a synonym for “process”?
a) task b) program c) executable code d) all of the above
Computer Science & Information Technology