GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Tech FAQs  >  OOPS
Go To First  |  Previous Question  |  Next Question 
 OOPS  |  Question 8 of 258    Print  
How can I return multiple values from a function?

  
Total Answers and Comments: 7 Last Update: January 28, 2006   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
July 19, 2005 07:28:25   #1  
Capreatki        

RE: How can I return multiple values from a function?
Use pointers... i think this is the best way to return multiple values from a functions....
 
Is this answer useful? Yes | No
July 19, 2005 08:06:11   #2  
Tanushri Banerjee        

RE: How can I return multiple values from a function?
If we call the function inside the loop we can
get

 
Is this answer useful? Yes | No
July 20, 2005 12:24:26   #3  
Santosh        

RE: How can I return multiple values from a function?
1. Using Function Pointers we can....
 
Is this answer useful? Yes | No
July 23, 2005 01:18:51   #4  
Girish        

RE: How can I return multiple values from a function?
How to return multiple values from a function using Function Pointer ....
 
Is this answer useful? Yes | No
September 21, 2005 02:58:09   #5  
yogeshpanda Member Since: September 2005   Contribution: 50    

RE: How can I return multiple values from a function?...
By Using the Pointer or the referance we can return more then one values
 
Is this answer useful? Yes | No
October 10, 2005 09:31:19   #6  
Sudhakar        

RE: How can I return multiple values from a function?
Either pass pointers to several locations which the function can fill in or have the function return a structure containing the desired values or (in a pinch) consider global variables.This solution is taken from comp.lang.c faqLink:http://www.eskimo.com/~scs/C-faq/q20.1.html
 
Is this answer useful? Yes | No
January 28, 2006 00:00:16   #7  
prakash        

RE: How can I return multiple values from a function?...
pass multiple variables to the function as formal parameters ... function will actually set those values (output variables).
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape