Printing "Hello World" to screen without using a single semicolon in C/C++

yes.it works fine.bt would you plz explain how?

Unknown - Feb 1, 2014

yes.it works fine.bt would you plz explain how?

Its because printf() returns the characters it prints. So if we do printf (“Hello World\n”) … it returns 10 (for helloworld) + 1 (for space) + 1 (for \n)=12.
Now, coming to main part, if(12) , will be executed as in C language, if(0) is like if (false), but if(any other integer) is true, so if statement is executed, meanwhile printing Hello World. Here is more info:
stackoverflow for printf()


See also