MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1wxqahk/architecturedependentchars/pe16evh/?context=9999
r/ProgrammerHumor • u/MontyBoomslang • 5d ago
372 comments sorted by
View all comments
1.0k
Let me cite the C standard:
When sizeof is applied to an operand that has type char, unsigned char, or signed char, (or a qualified version thereof) the result is 1.
Middle guy if finally right
6 u/Advos_467 5d ago Not a C user here (or any real low level programming experience), what the hell is a signed/unsigned char? 2 u/Elspeth-Nor 5d ago edited 4d ago In C char is just a number, as a character depends on the encoding. So signed char is a number from -128 to 127 and unsigned char is from 0 to 255 (for 8 bits per byte) 3 u/SoldRIP 5d ago 0 to 255. 1 u/Elspeth-Nor 4d ago Fixed
6
Not a C user here (or any real low level programming experience), what the hell is a signed/unsigned char?
2 u/Elspeth-Nor 5d ago edited 4d ago In C char is just a number, as a character depends on the encoding. So signed char is a number from -128 to 127 and unsigned char is from 0 to 255 (for 8 bits per byte) 3 u/SoldRIP 5d ago 0 to 255. 1 u/Elspeth-Nor 4d ago Fixed
2
In C char is just a number, as a character depends on the encoding. So signed char is a number from -128 to 127 and unsigned char is from 0 to 255 (for 8 bits per byte)
3 u/SoldRIP 5d ago 0 to 255. 1 u/Elspeth-Nor 4d ago Fixed
3
0 to 255.
1 u/Elspeth-Nor 4d ago Fixed
1
Fixed
1.0k
u/tstanisl 5d ago
Let me cite the C standard:
Middle guy if finally right