C Programming Reference
 
C Programming Reference >> C  Programming Reference Question Bank >>

19/07/07 - 714 Views - Ratings :   3.8 of 5 / 5 Votes

Level - Beginner
      

Question -

Write a program to print "HI",  without any semi colon.
Answer -
#include <stdio.h>


void  main ()
{
    if ( printf ("HI"))
}
Explanation -

Tricky C question and favorite of examiners. Quite self explanatory and easy to grasp code. One point to mention is that we can not use int main () because then we need a semi colon in return statement.

Reader Comments -

Author Comments
Add Comments 


Name :    
Reply :   


Rating :

Code :
Code

 

 
© 2006 cencyclopedia.com