Last Updated: February 25, 2016
·
417
· imwithye

Write C program without semicolons.

This is a very funny idea that writing C program "Hello World" without semicolons, though it is really useless.

We can use the best of C syntax:

  • IF statement:
if(printf("Hello World!\n")){}
  • WHILE statement
while(printf("Hello World\n") && 0){}

or

while(printf("Hello World\n"), 0){}

Actually I write a console minesweeper game in C without using any semicolons. Check it out if you are interested in this:)

https://github.com/imwithye/minesweeper-wtf