Wednesday, September 5, 2007

without semicolon how to write c program

How to print something - say to write a code "hello world" without any semicolon.
Well the solution is very simple...






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

Al


1 comment:

alokadvin said...

someone can try this , if there is a constraint on using if,loops,switch ....

#include < stdio.h >

int main(int argc, char *argv[static printf("Hello World\n"), 0])
{
}