Solved

Which of the Following Will Not Help Prevent Infinite Loops

Question 1

Multiple Choice

Which of the following will not help prevent infinite loops?


A) Include braces around the statements in a do…while statement.
B) Ensure that the header of a for or while statement is not followed by a semicolon.
C) If the loop is counter-controlled, the body of the loop should increment or decrement the counter as needed.
D) If the loop is sentinel-controlled, ensure that the sentinel value is input eventually.

Correct Answer:

verifed

Verified

Related Questions