170k views
4 votes
Identify the false statement.

a. A well-written while loop contains an initialized loop control variable that is tested in the while expression and then altered in the loop body.
b. A finite loop executes a specific number of times; an indefinite loop is one that never ends.
c. In an indefinite loop, you don't know how many times the loop will occur.

1 Answer

4 votes

Final answer:

An indefinite loop is one that may or may not end, while a finite loop executes a specific number of times.

Step-by-step explanation:

The false statement in the options provided is option b. An indefinite loop is one that may or may not end, while a finite loop executes a specific number of times. In an indefinite loop, you don't know in advance how many times the loop will occur. However, an indefinite loop can still end under certain conditions, such as when a certain condition is met or when a break statement is encountered.

User Jgr
by
8.2k points