How main() is getting called in C programm

Discussion in 'C' started by atul.sharma12, May 24, 2008.

  1. atul.sharma12

    atul.sharma12 New Member

    Joined:
    May 21, 2008
    Messages:
    15
    Likes Received:
    2
    Trophy Points:
    0
    Occupation:
    S/W Engg.
    Location:
    This Planet only!!!!
    I am having some doubts-

    who called main() in a 'C' programme?

    Main() is a function (Considered as Entry point to program) from that we can call our sunroutines but someone has to call this Main() and it will return to whom and in runtime this Main() is stored/runnng exactly where in the memroy ?

    I will appreciate if someone help me to figure it out .

    Looking forward
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Main is the entry point is what book says but actually before main is called there are lots of functions / variables that needs to be called / initialize like Global variables / static functions and all are done by CRTStartup function
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice