home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!mcsun!news.funet.fi!hydra!klaava!wirzeniu
- From: wirzeniu@klaava.Helsinki.FI (Lars Wirzenius)
- Subject: Re: Question to test general C knowledge
- Message-ID: <1992Dec23.070530.1128@klaava.Helsinki.FI>
- Organization: University of Helsinki
- References: <1992Dec21.170917.17770@thunder.mcrcim.mcgill.edu> <wsP8VB1w165w@quest.UUCP>
- Date: Wed, 23 Dec 1992 07:05:30 GMT
- Lines: 16
-
- srhqla!quest!kdq 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.
-
- No. sizeof measures things in chars, not 8-bit bytes. sizeof(char)
- is guaranteed to be 1. (I'd quote the standard, but I probably won't
- get it until after the next standard has been published and the old
- one is sold cheaply. :-)
-
- --
- Lars.Wirzenius@helsinki.fi (finger wirzeniu@klaava.helsinki.fi)
- MS-DOS, you can't live with it, you can live without it.
-
-