home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / c / 12217 < prev    next >
Encoding:
Internet Message Format  |  1992-08-12  |  838 b 

  1. Xref: sparky comp.lang.c:12217 comp.programming:2282
  2. Newsgroups: comp.lang.c,comp.programming
  3. Path: sparky!uunet!mcsun!sunic!ugle.unit.no!venaas
  4. From: venaas@siri.unit.no (Stig Venaas)
  5. Subject: Re: A LITTLE BRAINTEASER...
  6. Message-ID: <1992Aug12.130437.1465@ugle.unit.no>
  7. Sender: news@ugle.unit.no (NetNews Administrator)
  8. Organization: University of Trondheim
  9. References: <aet.713608023@munagin>
  10. Date: Wed, 12 Aug 92 13:04:37 GMT
  11. Lines: 13
  12.  
  13. It's easy I think.
  14.  
  15. First you use your code for reversing all the input, then
  16. afterwards you use your code for reversing each line.
  17. The result is that each line is in the original order, but
  18. the order of the lines are reversed.
  19.  
  20. You could also do it the other way around.
  21. The answer is, use your two routines in succesion. Which one you
  22. uses first is not important.
  23.  
  24. -- 
  25. Stig (venaas@siri.unit.no)
  26.