home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / c / 11448 < prev    next >
Encoding:
Internet Message Format  |  1992-07-22  |  705 b 

  1. Path: sparky!uunet!ogicse!hp-cv!sdd.hp.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!news.cis.ohio-state.edu!ychung
  2. From: ychung@news.cis.ohio-state.edu (yiu fai chung)
  3. Newsgroups: comp.lang.c
  4. Subject: How can I return two value to a procedure ???
  5. Message-ID: <9207222041.AA00524@honeydew.cis.ohio-state.edu>
  6. Date: 22 Jul 92 12:41:50 GMT
  7. Article-I.D.: honeydew.9207222041.AA00524
  8. Sender: ychung@cis.ohio-state.edu (yiu fai chung)
  9. Organization: The Ohio State University Department of Computer and Information Science
  10. Lines: 10
  11.  
  12. I would like to return two values of two variables.
  13. How can I do that ?
  14.  
  15. This is what I wrote:
  16. void change_value( int *i, int *j )
  17. {
  18.   *i = 2;
  19.   *j = 3;
  20.   return (*i, *j);
  21. }
  22.