Can u dare to answer this

Anchal Laller's Avatar, Join Date: Feb 2011
Newbie Member
As we know execution starts from main method, is there any procedure to replace this calling by other function
In which file this information is defined??
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Yes you can define your own static variable which calls a function and this way your execution can begin before call to main.
xpi0t0s's Avatar, Join Date: Aug 2004
The call to main is performed in a compiler-specific object file, in at least one compiler I've seen this is called _crt0.o. If you write your own _crt0.c and compile it, you could in theory change the starting function, but there's not a lot of point: just create a main function that calls the function you want to call; it's a lot less work.