473,386 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

function call

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.
Nov 14 '05 #1
6 1697
On 15 Dec 2004 20:35:55 -0800, up******@gmail.com (Upendra) wrote in
comp.lang.c:
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.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Nov 14 '05 #2
Upendra wrote:
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.

Nov 14 '05 #3
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

Nov 14 '05 #4
up******@gmail.com wrote:
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.
Nov 14 '05 #5
In article <f8********************************@4ax.com>,
Jack Klein <ja*******@spamcop.net> wrote:
On 15 Dec 2004 20:35:55 -0800, up******@gmail.com (Upendra) wrote in
comp.lang.c:
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?


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)

Nov 14 '05 #6
On 15 Dec 2004 21:31:29 -0800, up******@gmail.com wrote in
comp.lang.c:
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.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Nov 14 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: JKop | last post by:
Take the following simple function: unsigned long Plus5Percent(unsigned long input) { return ( input + input / 20 ); } Do yous ever consider the possibly more efficent:
2
by: laredotornado | last post by:
Hello, I am looking for a cross-browser way (Firefox 1+, IE 5.5+) to have my Javascript function execute from the BODY's "onload" method, but if there is already an onload method defined, I would...
13
by: Bern McCarty | last post by:
I have run an experiment to try to learn some things about floating point performance in managed C++. I am using Visual Studio 2003. I was hoping to get a feel for whether or not it would make...
23
by: bluejack | last post by:
Ahoy... before I go off scouring particular platforms for specialized answers, I thought I would see if there is a portable C answer to this question: I want a function pointer that, when...
21
by: dragoncoder | last post by:
Consider the following code. #include <stdio.h> int main() { int i =1; printf("%d ,%d ,%d\n",i,++i,i++); return 0; }
4
by: Michael | last post by:
Hi, I'm having difficulty finding any previous discussion on this -- I keep finding people either having problems calling os.exec(lepev), or with using python's exec statement. Neither of...
3
by: Beta What | last post by:
Hello, I have a question about casting a function pointer. Say I want to make a generic module (say some ADT implementation) that requires a function pointer from the 'actual/other modules'...
9
by: CryptiqueGuy | last post by:
Consider the variadic function with the following prototype: int foo(int num,...); Here 'num' specifies the number of arguments, and assume that all the arguments that should be passed to this...
6
by: RandomElle | last post by:
Hi there I'm hoping someone can help me out with the use of the Eval function. I am using Access2003 under WinXP Pro. I can successfully use the Eval function and get it to call any function with...
9
by: Morten Lemvigh | last post by:
Is it possible to pass a pointer to a constructor or a class definition as argument to a function? Maybe in a way similar to passing function pointers...? The function should construct a number...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.