How to create infinite loop in C:

We can create infinite loop in C programming. We will show here using While loop.
Suppose we want to print the string "Bangladesh" infinite number of time.
Source Code:

#include<stdio.h>

int main()
{

    while(1)
    {
         printf("Banglasesh\n");  //Bangladesh will be print infinite number of time.
     }

     return 0;
}

Thank You. :)

Comments

Popular Posts