this is because of some of the people claiming so and the kind of support provied in gcc (and may be turbo C++ will i hate this ancient compiler )
check link http://livefusion.wordpress.com/2006/08/24/c-program-without-main/ snips. Yes it is possible to write a program in c without using main. Here is the code: /* prog_without_main.c */ _start() { _exit(my_main()); } int my_main(void) { printf("Hello\n"); return 42; } And use this command (% is command prompt) to compile: %gcc -O3 -nostartfiles prog_without_main.c Try compiling this example: #include<stdio.h> #define decode(s,t,u,m,p,e,d) m##s##u##t #define begin decode(a,n,i,m,a,t,e) void begin() { printf("hello"); }
