Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 9
Short answer, no. Not-so-long answer, you can compile it to object files (.o) and halt there without calling the linker, but you obviously cannot run it since it isn't a complete program.
1st Jan 2019, 1:49 AM
Hatsy Rei
Hatsy Rei - avatar
I think in C/C++ the compiler start executing starting with main function so without it,it won't run.
15th Jan 2019, 10:13 AM
we can compile the C Program without main function but while execution main function first executable statement of the program
14th Feb 2019, 6:08 AM
sree harsha
sree harsha - avatar