Sunday 4 July 2010

Write a c program to print Hello world without using any semicolon

#include<stdio.h>
#include<conio.h>
void main()
{
 if(printf("Hello world"))
{
 }
}


Solution: 2
#include<stdio.h>
#include<conio.h>

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

Solution: 3
#include<stdio.h>
#include<conio.h>
 void main()
{
 switch(printf("Hello world")){
 }
}

You may like the following posts:
Statements
If..else statement
Nested if statements
Switch statement

No comments:

Post a Comment