home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / c / 18845 < prev    next >
Encoding:
Text File  |  1992-12-23  |  1.1 KB  |  29 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!munnari.oz.au!bunyip.cc.uq.oz.au!kirk!ptcburp!michi
  3. From: michi@ptcburp.ptcbu.oz.au (Michael Henning)
  4. Subject: Re: Question to test general C knowledge
  5. Message-ID: <1992Dec24.000118.20879@ptcburp.ptcbu.oz.au>
  6. Organization: Pyramid Technology Corporation
  7. References: <1992Dec21.170917.17770@thunder.mcrcim.mcgill.edu> <wsP8VB1w165w@quest.UUCP>
  8. Date: Thu, 24 Dec 1992 00:01:18 GMT
  9. Lines: 18
  10.  
  11. kdq@quest.UUCP (Kevin D. Quitt) writes:
  12.  
  13. >mouse@thunder.mcrcim.mcgill.edu (der Mouse) writes:
  14. >> sizeof(4["this is a test"])
  15. >> must produce 1, or your compiler's broken.
  16.  
  17. >    Either that, or you've got 16-bit chars.
  18.  
  19.  
  20. It doesn't matter how many bits you have in a char, sizeof(char) is always 1,
  21. by definition (Section 3.3.3.4 of the ANSI C standard).
  22.  
  23.                                 Michi.
  24. -- 
  25.       -m------- Michael Henning                 +61 75 950255
  26.     ---mmm----- Pyramid Technology              +61 75 722475 FAX
  27.   -----mmmmm--- Research Park, Bond University  michi@ptcburp.ptcbu.oz.au
  28. -------mmmmmmm- Gold Coast, Q 4229, AUSTRALIA   uunet!munnari!ptcburp.oz!michi
  29.