Bit Addressable Architectures

Greg Pasquariello X1190 gp at picuxa.UUCP
Tue Apr 5 00:27:59 AEST 1988


In article <113 at csanta.UUCP> greg at csanta.UUCP (Root) writes:
>Hmm, I'm new on the net here, so excuse me for jumping into the middle of a
>discussion, but sizeof(char) is always 1.  The number of bits in a char
>is a whole 'nuther story.  This is usually 8, but need not be.  This is
>true of both dpANSI C and K&R C.

This is true of the dpANSI C and K&R C _implementation_, but it is not neces-
sarily true of the C definition.  Sizeof yields "the size, in bytes, of it's 
operand" (K&R pg 188).   The fundamental type char, is "large enough to store
any member of the implementations character set" (K&R pg 182).  This _could_
be multiple bytes!


(God I hope what I just said is true :-))

Greg Pasquariello
ihnp4!picuxa!gp



More information about the Comp.lang.c mailing list