Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

For each of the following, enter T if the statement is TRUE otherwise enter F fo

ID: 3803511 • Letter: F

Question

For each of the following, enter T if the statement is TRUE otherwise enter F for FALSE.

_____ (1)     A do while loop is a form of a post - test loop whereas a while loop is a form of a pre - test loop.

_____ (2)     The relational expression in a while loop is tested at the beginning of each execution of the loop.

_____ (3)     An infinite do while loop is one in which the while condition is always true.

_____ (4)     A while loop is a form of a post - test loop whereas the do while loop is a form of a pre - test loop.

_____ (5)     A nested loop is a loop, which contains, within itself, at least one other loop.

Explanation / Answer

(1)     A do while loop is a form of a post - test loop whereas a while loop is a form of a pre - test loop.

Answer: True

(2) The relational expression in a while loop is tested at the beginning of each execution of the loop.

Answer: True

(3)     An infinite do while loop is one in which the while condition is always true.

Answer: True

(4)     A while loop is a form of a post - test loop whereas the do while loop is a form of a pre - test loop.

Answer: False

5)     A nested loop is a loop, which contains, within itself, at least one other loop.

Answer: True