MAIN FUNCTION
Title
Question
Can we compile a program without main() function?
C-and-Cpp First-C-Program 05-06 min 10-20 sec
Answers:
Yes you can compile into an object file. For example, do "gcc -c xyz.c" to get object file xyz.o
To later get an executable, you have to link together mutiple object files. You can use gcc/g++ for the same purpose. gcc/g++ also have linking functionality in addition to compiler functionality.
Login to add comment