Can we compile a program without main() function in C Language?
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”);
- }
Recent Posts