GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Tech FAQs  >  OOPS

 Print  |  
Question:   How can I return multiple values from a function?



October 10, 2005 09:31:19 #6
 Sudhakar   Member Since: Visitor    Total Comments: N/A 

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
     

 

Back To Question