home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / c / 18955 < prev    next >
Encoding:
Internet Message Format  |  1992-12-29  |  1.3 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!wupost!usc!srhqla!quest!kdq
  2. From: kdq@quest.UUCP (Kevin D. Quitt)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Question to test general C knowledge
  5. Message-ID: <m5TiwB1w165w@quest.UUCP>
  6. Date: Mon, 28 Dec 92 18:01:09 PST
  7. References: <1992Dec28.161730.13653@mksol.dseg.ti.com>
  8. Reply-To: srhqla!quest!kdq
  9. Organization: Job quest  (805) 251-8210,  So Cal: (800) 400-8210
  10. Lines: 23
  11.  
  12. mccall@mksol.dseg.ti.com (fred j mccall 575-3539) writes:
  13. >In <wsP8VB1w165w@quest.UUCP>kdq@quest.UUCP (Kevin D. Quitt) writes:
  14. >>mouse@thunder.mcrcim.mcgill.edu (der Mouse) writes:
  15. >>>sizeof(4["this is a test"])
  16. >>>must produce 1, or your compiler's broken.
  17. >>
  18. >>   Either that, or you've got 16-bit chars.
  19. >
  20. >sizeof(char) is defined to be 1, so it doesn't matter if you have
  21. >16-bit chars or not; it still better give back a 1.
  22.  
  23.     Interesting.  The standard states (3.3.3.4) that sizeof returns the
  24. size of an object in bytes (exclusive of function and incomplete
  25. types), and also states that the sizeof any qualified char is 1.
  26.  
  27.     Apparently, while they support multi-byte characters, as strings
  28. (and provide functions for them), they don't directly support the 16bit
  29. character.  Hmm...
  30.  
  31.  
  32.  
  33.  _
  34. Kevin D. Quitt      96.37% of all statistics are made up.     srhqla!quest!kdq
  35.