C program to print message (Hello World/Hello C) without using any semicolon in program.

In this program, we will learn how to print any message without using semicolon (;) ?, as we all knows that we can print message using printf statement and printf statement terminates with semicolon.
Here is a trick to print message without terminating statement by semicolon (;) –

Call printf statement within the if condition and there is no need to terminate printf statement with semicolon (;) in if condition.

/*Program to print "Hello C" or any message 
without using any “;” in program*/ 

#include <stdio.h>
int main() 
{ 
    if(printf("Hello C\n")) 
    { } 
}


    Hello C