function call

U

Upendra

Can any body explain me about the exact sequence of operations that
takes place when a function call takes place. Consider all cases like
functions with no return values and one or more retun values(directly
or indirectly) and functions with different types of formal arguments
passed.
 
E

E. Robert Tisdale

Upendra said:
Can any body explain me about the exact sequence of operations that
takes place when a function call takes place. Consider all cases like
functions with no return values and one or more retun values(directly
or indirectly) and functions with different types of formal arguments
passed.

The exact sequence of operations is implementation dependent
and off topic in the comp.lang.c newsgroup.

Please tell us which compiler and operating system you are using
so that we can direct you to a more appropriate form.
 
J

Jack Klein

Can any body explain me about the exact sequence of operations that
takes place when a function call takes place. Consider all cases like
functions with no return values and one or more retun values(directly
or indirectly) and functions with different types of formal arguments
passed.

Homework?

Such a detailed description would be far too large for a usenet post,
perhaps you should get a copy of the C language standard or a good
reference book on C.

Your terminology is wrong. Functions in C don't have "one or more
return values", either directly or indirectly. They may have exactly
zero or one return values. The concepts of "indirectly" returning
values does not exist in the C language, although that may be
appropriate in a higher level concept.

And formal arguments are never passed to functions.
 
U

upendrao

If it is not possible to answer through usenet. Can you please direct
me to a link where I can get the info. I am using gcc on Sun Solaris 8.
/upendra
 
E

E. Robert Tisdale

If it is not possible to answer through usenet.
Can you please direct me to a link where I can get the info.
I am using gcc on Sun Solaris 8.
I used Google

http://www.google.com/

to search for

+"Sun Microsystems" +"Solaris" +"gcc' +"function call" +"stack frame"

and I found lots of stuff including
Understanding stacks and registers in the Sparc Architecture(s)

http://www.sics.se/~psm/sparcstack.html

You might also try the comp.unix.solaris newsgroup
or one of the comp.sys.sun.* newsgroups
but I don't subscribe to any of them
so I can't give you a first hand recommendation.
 
K

Kenny McCormack

Clearly.

Such a detailed description would be far too large for a usenet post,

Explain the universe. Be thorough. Give examples.
You have 20 minutes (or 3 screens - whichever comes first)
 
J

Jack Klein

If it is not possible to answer through usenet. Can you please direct
me to a link where I can get the info. I am using gcc on Sun Solaris 8.
/upendra

What is it that you need to know that can't be supplied by a book like
K&R2 or any decent book on C?

As always, the definitive reference is the language standard.

You can buy the actual C standard for $18.00 USD and download as a PDF
file from http://www.ansi.org. Search for ISO 9899.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,156
Messages
2,570,878
Members
47,408
Latest member
AlenaRay88

Latest Threads

Top