C Program to print Hello world without using any semicolon

December 16, 20221 min read

we can print "hello" or "hello world" or anything else in C without using semicolon.

There are various ways to do so:

Solution: 1

void main() { if(printf("Hello world")) { //Do Nothing } }

Solution: 2

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

Solution: 3

void main() { switch(printf("Hello world")) { //Do Nothing } }
Baby Panda Codes

About Baby Panda Codes

Full-Stack Engineer

Baby Panda Codes is an experienced Full-Stack Engineer and trainer, focusing on code quality.


Baby Panda Codes

Copyright © 2022