Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Computer Forums > Programmers Lounge > Programming Discussions » Function returning pointers
Closed Thread
Old 04-14-2005, 07:32 PM   #1 (permalink)
 
True Techie

Join Date: Dec 2004

Posts: 145

Mohan Giri

Default Function returning pointers

what is mean by function returning pointer? Can we print the value at the address using the address without using any variable?
Mohan Giri is offline  
Old 04-14-2005, 10:43 PM   #2 (permalink)
 
Newb Techie

Join Date: Apr 2005

Posts: 6

f11m

Default

explain what you are asking and maybe i can help
f11m is offline  
Old 04-15-2005, 12:48 PM   #3 (permalink)
 
Junior Techie

Join Date: Dec 2004

Posts: 88

developer

Default

int *myfunction(int a)
This is an example of a pointer returning function. How do you have the address, u must have it in some variable. * is value at the address operator. You cannot simply reference any memory as it may be not in your bounds.
__________________
Somewhere I Belong...
developer is offline  
Old 04-15-2005, 01:40 PM   #4 (permalink)
 
True Techie

Join Date: Dec 2004

Posts: 145

Mohan Giri

Default

Can we specify *myfunction() in printf to print a value at the address?
Mohan Giri is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On