[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]


    Search the Q&A Archives


Does Main() function in C program is stored at specific...

<< Back to: comp.lang.c FAQ list Table of Contents

Question by dev_puru
Submitted on 12/17/2003
Related FAQ: comp.lang.c FAQ list Table of Contents
Rating: Rate this question: Vote
Does Main() function in C program is stored at specific memory location?
or
i would like to know how a C program executes?


Answer by naidu_trk
Submitted on 12/18/2003
Rating:  Rate this answer: Vote
The main function is not stored in any specific location it is stored as any other normal function . The c run time system inserts some start up code before ur main function and inserts some clean up code at the end of the program .

The operating system loads the executable of ur program in to the memory with the help of the loader and transfers the control to ur program .

 

Answer by crixandra
Submitted on 6/28/2004
Rating:  Rate this answer: Vote
how can i introduce the normal function?

 

Answer by kumar
Submitted on 8/7/2004
Rating: Not yet rated Rate this answer: Vote
first declare(prototype) the function and made definition for that function .defintion must be  
avilable in out side of main function.

 

Answer by amit
Submitted on 7/1/2005
Rating: Not yet rated Rate this answer: Vote
you can introduce a normal function by call
it in main and declare it after body of the main.

 

Answer by Sachin
Submitted on 7/14/2005
Rating: Not yet rated Rate this answer: Vote
detail of main function in c

 

Answer by naveen
Submitted on 8/24/2006
Rating: Not yet rated Rate this answer: Vote
i would like to join this team so i am sending an ack plz do conformation

 

Answer by Hamid Hamee
Submitted on 3/14/2007
Rating: Not yet rated Rate this answer: Vote
Main function: A main () function in a 'C' programming language or in general calls all the other functions, which are part of the program, basically it controls the program.                                                                                  
And the Functions within the source program perform one or more specific tasks. The main function can call these functions to perform their respective tasks. When main calls another function, it passes execution control to the function, so that execution begins at the first statement in the function. A function returns control to main when a return statement is executed or when the end of the function is reached.

 

Your answer will be published for anyone to see and rate.  Your answer will not be displayed immediately.  If you'd like to get expert points and benefit from positive ratings, please create a new account or login into an existing account below.


Your name or nickname:
If you'd like to create a new account or access your existing account, put in your password here:
Your answer:

FAQS.ORG reserves the right to edit your answer as to improve its clarity.  By submitting your answer you authorize FAQS.ORG to publish your answer on the WWW without any restrictions. You agree to hold harmless and indemnify FAQS.ORG against any claims, costs, or damages resulting from publishing your answer.

 

FAQS.ORG makes no guarantees as to the accuracy of the posts. Each post is the personal opinion of the poster. These posts are not intended to substitute for medical, tax, legal, investment, accounting, or other professional advice. FAQS.ORG does not endorse any opinion or any product or service mentioned mentioned in these posts.

 

<< Back to: comp.lang.c FAQ list Table of Contents


[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]

© 2008 FAQS.ORG. All rights reserved.