Respuesta :

Answer:

Infinite loop is a loop which don't have any end. It will go into infinite number of iterations

Explanation:

Infinite loops are always undesired as it  takes  more CPU time and system memory.it makes the program unresponsive and user needs to terminate that.

example:

int i=5;

while(i>0){

printf("it is positive number";

}

Above is an example of infinite loop where i is always positive number.

Here we need to either decrement i value  in the loop or terminate the loop by using break statement.

In some programming languages where we have exception handling we can check for "Stack Overflow" Exception which in general caused because of infinite loop. In catch block we can handle that exception

ACCESS MORE
EDU ACCESS
Universidad de Mexico