saving . . . saved MAIN FUNCTION has been deleted. MAIN FUNCTION has been hidden .
MAIN FUNCTION
Title
Question
Can we compile a program without main() function?

C-and-Cpp First-C-Program 05-06 min 10-20 sec 29-02-20, 5:03 p.m. snagendraprabhu

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.
29-02-20, 5:51 p.m. bhaskar76



01-03-20, 10:22 a.m. kapilshukla2006


Log-in to answer to this question.