If a loop does not terminate at all and keeps on executing endlessly, then it…
2021
If a loop does not terminate at all and keeps on executing endlessly, then it is known as _____.
- A.
For loop
- B.
Finite loop
- C.
While loop
- D.
Infinite loop
Attempted by 236 students.
Show answer & explanation
Correct answer: D
An infinite loop occurs when a program executes a block of code repeatedly without a terminating condition. This differs from finite loops which stop after a specific number of iterations or when a condition becomes false.