Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

  > The value of "sizeof (char)" in C is 1.
For those who might not be aware, this does not mean that a char is always 8 bits.


According to C99 spec, the maximum number of bits for the smallest object that is not a bit-field is 8 bits. See "CHAR_BIT" in the C99 spec.

[1] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf


Smallest. It might be larger (and infact it is in a lot of DSP toolchains)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: