DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Hello World - C

05.26.2005
| 224408 views |
  • submit to reddit
        
#include <stdio.h>

main()
{
  for(;;)
      { 
          printf ("Hello World!\n");
      }
}
    

Comments

Snippets Manager replied on Sat, 2010/08/07 - 10:24pm

hmm... nay... provocative I think.

Karl Smith replied on Tue, 2007/12/25 - 6:11pm

cunning

Snippets Manager replied on Fri, 2007/01/26 - 8:26pm

The for loop is so the code never gets to the missing 'return 0;' statement.

Snippets Manager replied on Mon, 2012/05/07 - 2:12pm

why the for loop?