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:

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

    #include &lt stdio.h &gt

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

    ReplyDelete