Write a C Program to print Hello world without using Semicolon

Semicolon is the statement terminator in compiler of C language. Our task is to write a piece of code to print Hello World! or any other line without using semicolons.
this can be done in the part of syntax which is free from bound of semicolons and these are IF-ELSE statements and LOOPS. It means that you can write your printf statement in these parts.

EXAMPLE:

#include<stdio.h>
#include<conio.h>

void main()
 {
     if(!printf("Without Semicolons ? Piece of Cake %c\n",2))

 getch();
 }


Same thing can be done with WHILE LOOP

#include<stdio.h>
#include<conio.h>

void main()
 {
     while(!printf("Without Semicolons ? Piece of Cake %c\n",2))

 getch();
 }


Post a Comment

CodeNirvana
Newer Posts Older Posts
© Copyright Encyclopedia of C | Designed By Code Nirvana
Back To Top