How to write a running C code without main( ) ?

The tittle of this article looks Dangerous at first sight but the program is actually pretty simple. Here is the code you can play with it.

 

 

Output

Running C code without main

 

If you like this Article, then don’t forget to Click on Social likes buttons.

  • twinkal

    //without using “main” word in code
    #include
    #define fun (a,b,c,d) a##b##c##d()
    int fun(m,a,i,n)
    {
    printf(“www.firmcodes.com”);

    return 0;
    }