home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / c / 18277 < prev    next >
Encoding:
Internet Message Format  |  1992-12-12  |  916 b 

  1. Path: sparky!uunet!spool.mu.edu!uwm.edu!ogicse!das-news.harvard.edu!cantaloupe.srv.cs.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!dw3u+
  2. From: dw3u+@andrew.cmu.edu (Daniel C. Wang)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Question to test general C knowledge
  5. Message-ID: <8f_bGuK00aw3At0FV2@andrew.cmu.edu>
  6. Date: 12 Dec 92 13:24:42 GMT
  7. Article-I.D.: andrew.8f_bGuK00aw3At0FV2
  8. References: <Bz0A46.Cvu@watserv1.uwaterloo.ca>
  9.     <1992Dec11.214128.1136@nb.rockwell.com>
  10. Organization: Freshman, MCS general, Carnegie Mellon, Pittsburgh, PA
  11. Lines: 19
  12. In-Reply-To: <1992Dec11.214128.1136@nb.rockwell.com>
  13.  
  14.  
  15. wade@nb.rockwell.com (Wade Guthrie) writes:
  16. > One question that I particularly like, although few applicants ever get it, is:
  17. > what does:
  18. >  printf("shop"+1); 
  19. > do?
  20. > Wade
  21. > wade@nb.rockwell.com
  22.  
  23. hop 
  24.  
  25. "shop"+1 is the address of the string constant "shop" plus one. So
  26. printf gets "hop";
  27.  
  28. Am I hired? :) 
  29.