+ 1

Can a program be executed without main function???

while doing project in group we split into modules.. so everyone absolutely have their own main(). how can we help ourselves from these many main()??

9th Sep 2017, 5:23 AM
hamsa
hamsa - avatar
3 Respuestas
+ 4
A program only needs an entry point address to execute, doesn't have to be main. In fact it's typically not even main. The compiler inserts code at the entry point and calls your main or equivalent function after initialization
9th Sep 2017, 6:01 AM
aklex
aklex - avatar
+ 2
All programs have an entry point but it isn't always "main". The entry point for a windows program typically looks like "WinMain". The parameters of the entry point also vary
9th Sep 2017, 5:58 AM
Jordan Chapman
Jordan Chapman - avatar