sizeof(char)
Ray Butterworth
rbutterworth at watmath.UUCP
Tue Nov 11 06:50:49 AEST 1986
> In article <126 at olamb.UUCP> kimcm at olamb.UUCP (Kim Chr. Madsen) writes:
> >Why not take the full step and let the datatype char be of variable size,
> >like int's and other types. Then invent the datatype ``byte'' which is exactly
> >8 bits long.
Who says bytes are 8 bits long? They're 9 on the machine I use.
Why not make sizeof() return the number of bits? I don't think
there is much argument about how big a bit is. And the number of
bits is much more useful than the number of chars. If you really
want the number of chars, use "sizeof(object)/sizeof(char)".
More information about the Comp.lang.c
mailing list