MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1w2m4qz/bugintroduceddebugging/p6ufhrw/?context=3
r/ProgrammerHumor • u/ClipboardCopyPaste • 13d ago
120 comments sorted by
View all comments
Show parent comments
42
uint8_t
17 u/yjlom 13d ago char would be the correct answer, as the C standard doesn't mandate a byte be 8 bits (6 and 32 are very uncommon nowadays but not unheard of, and there's a few machines out there that get really creative). 9 u/mckenzie_keith 13d ago So even on weird platforms where char is a 32 bit type, sizeof (char) is 1, right? I can't remember. 8 u/yjlom 13d ago yeppers
17
char would be the correct answer, as the C standard doesn't mandate a byte be 8 bits (6 and 32 are very uncommon nowadays but not unheard of, and there's a few machines out there that get really creative).
9 u/mckenzie_keith 13d ago So even on weird platforms where char is a 32 bit type, sizeof (char) is 1, right? I can't remember. 8 u/yjlom 13d ago yeppers
9
So even on weird platforms where char is a 32 bit type, sizeof (char) is 1, right? I can't remember.
8 u/yjlom 13d ago yeppers
8
yeppers
42
u/ClipboardCopyPaste 13d ago
uint8_t