SSC MTS EXAM

SSC

COMPUTER

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Infinite Loop is a loop that repeats forever
A
True
B
False
C
Either A or B
D
None of the above
Explanation: 

Detailed explanation-1: -An infinite loop–sometimes called an endless loop–is a piece of code that lacks a functional exit so that it repeats indefinitely. In computer programming, a loop is a sequence of instructions that is continually repeated until a certain condition is reached.

Detailed explanation-2: -We can generate an infinite loop intentionally using while True . In this case, the loop will run indefinitely until the process is stopped by external intervention ( CTRL + C ) or when a break statement is found (you will learn more about break in just a moment).

Detailed explanation-3: -The statement within the body of a loop must ensure that the test condition for the loop eventually becomes false, otherwise, the loop will run infinitely. Hence, the loop which doesn’t end is called an infinite loop.

There is 1 question to complete.