News for hackers. Stuff that matters.
Re:So you think you know C? by ohyoutravel on Tuesday November 08, 2016 @02:40PM (#12903294)
Is this true? I thought the C99 standard just specified that the guaranteed minimum size is 1 byte. I've been using CHAR_BIT to define this.
Re:So you think you know C? by eps on Tuesday November 08, 2016 @02:44PM (#12903330)
sizeof(char) is indeed 1. It's the CHAR_BIT that fluctuates (and we have a Cray compiler to prove it).
Re:So you think you know C? by ori_b on Tuesday November 08, 2016 @04:07PM (#12903951)
Note that POSIX defines CHAR_BIT as 8.
Re:So you think you know C? by plorkyeran on Tuesday November 08, 2016 @03:10PM (#12903515)
sizeof(char) is inherently 1 because sizeof()'s unit is chars, not bits or bytes.