Google News
logo
C-Language - Interview Questions
Can we compile a program without main() function?
Yes, we can compile, but it can't be executed.
 
But, if we use #define, we can compile and run a C program without using the main() function. For example:
 
#include<stdio.h>    
#define start main    
void start() {    
   printf("Hello");    
}
Advertisement