home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / c / 18573 < prev    next >
Encoding:
Text File  |  1992-12-18  |  1.4 KB  |  41 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!UB.com!pippen.ub.com!rfries
  3. From: rfries@sceng.ub.com (Robert Fries)
  4. Subject: Re: Question to test general C knowledge
  5. Message-ID: <rfries.151@sceng.ub.com>
  6. Sender: news@pippen.ub.com (The Daily News)
  7. Nntp-Posting-Host: 128.203.1.151
  8. Organization: Ungermann Bass
  9. References: <Bz0A46.Cvu@watserv1.uwaterloo.ca> <1992Dec12.111409.147@ondec.lonestar.org> <1992Dec16.231449.22903@cs.uow.edu.au> <rfries.150@sceng.ub.com>
  10. Date: Thu, 17 Dec 1992 23:47:19 GMT
  11. Lines: 28
  12.  
  13. In article <rfries.150@sceng.ub.com> rfries@sceng.ub.com (Robert Fries) writes:
  14.  
  15. >In article <1992Dec16.231449.22903@cs.uow.edu.au> davidr@cs.uow.edu.au (David Ian Raymond) writes:
  16.  
  17. >>d_north@ondec.lonestar.org (David G. North, CCP) writes:
  18.  
  19. >>>Or better yet, what is the type and value of the following expression:
  20. >>>  "this is a test"[4]
  21.  
  22. >>I give up. What is it?
  23.  
  24. >The value is ' '. 
  25. >An even more bizarre way of writing it is:
  26. >       4["this is a test"]
  27.  
  28. Oops, as someone pointed out to me, I forgot to mention that the type
  29. is char, so the value is more precisely (char)' ' , since ' ' is an int.
  30.  
  31. Robert
  32.  
  33. //////////////////////////////////////////////////////////////////////////
  34. Robert Fries
  35. Ungermann-Bass Inc.
  36.  
  37. DISCLAIMER:
  38.     Opinions contained herein are my own, and are not necessarily those
  39.     of Ungermann-Bass.
  40. //////////////////////////////////////////////////////////////////////////
  41.