What is an infinite loop in C Language?
A loop running continuously for an indefinite number of times is called the infinite loop.
Infinite For Loop:
- for(;;){
- //code to be executed
- }
Infinite While Loop:
- while(1){
- //code to be executed
- }
Infinite Do-While Loop:
- do{
- //code to be executed
- }while(1);
Recent Posts