C program for print infinte Hello World using while loop.

Interview Programming

#include <stdio.h>
int main()
{
while(1)
printf("Hello World\n");
return 0;
}

Here condition 1 means during condition checking time while loop return condition is always true.

Output:

Hello World

Hello World

Hello World

Hello World

.

.

.

.

.

0 Comments

You may find interest following article