Home About Contact Privacy Terms Disclaimer
TECHAntena
Last Updated On: September 23, 2017
Editor: Adeeb C

C Program to Print ‘Hello World’ Without Using Semicolon

Category: C,Programing
Tags

Every beginner starts their learning of a programming language by printing the ‘Hello World’. Do you know in C, you can print ‘Hello World’ without using the semicolon. Printing Hello World without using a semicolon is a common question in c interview questions.

Print ‘Hello World’ Without Using Semicolon

Here I’m explaining three different methods to print the ‘hello world’ without semicolon in C language.

Method 1: Using Switch

void main(){
switch(printf("Hello world")){
}
}

Method 2: Using While

void main(){
while(!printf("Hello world")){
}
}

Method 3: Using If

void main(){
if(printf("Hello world")){
}
}