473,800 Members | 2,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1708
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.l earn.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.solar is 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*******@spam cop.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.l earn.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
2718
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
7682
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 like mine to run immediately after it. So in the code below, what JS would i need to add to my "myfile.inc" page so that I could guarantee this behavior? <!-- main page --> <html> <head> <script type="text/javascript">
13
4151
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 sense to punch out from managed code to native code (I was using IJW) in order to do some amount of floating point work and, if so, what that certain amount of floating point work was approximately. To attempt to do this I made a program that...
23
7822
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 called, can be a genuine no-op. Consider: typedef int(*polymorphic_func)(int param);
21
4137
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
2376
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 which I mean here. Just for a moment, let's just take one definition for one of the
3
3660
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' that takes arguments of type (void *) because the ADT must be able to deal with any type of data. In my actual code, I will code the function to take arguments of their real types, then when I pass this pointer through an interface function, I...
9
3278
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 function are of type int. (My question has nothing to do with the definition of the function foo, so don't bother about it.) If I call the function as: foo(2,3,4,5,6,7,8);/*More arguments than expected*/
6
5932
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 or without parms. I know that any function that is passed to Eval() must be declared Public. It can be a Sub or Function, as long as it's Public. I even have it where the "function" evaluated by Eval can be in a form (class) module or in a standard...
9
23776
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 of objects using the given constructor. The objects should all inherit from a base class. It's not possible to pass actual objects, since it's not given on beforehand, how many should be created.
0
9551
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10505
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10275
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10033
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7576
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5471
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.