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