Friday, 2 October 2015

How to write a program to print "hello world" without using any semicolon in the program ?

Program to print "hello world" without using any semicolon in the program ?


Simple and a tricky program, check out if you could think it through...

Here are three ways of doing it: 



#include<stdio.h>
void main(){

//#1
if(printf("hello world")){
}


//#2

do{

}while(!printf("hello world"))


// #3

switch(printf("hello world")){

}

}

No comments:

Post a Comment