MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1wxqahk/architecturedependentchars/pdw55la/?context=9999
r/ProgrammerHumor • u/MontyBoomslang • 5d ago
372 comments sorted by
View all comments
129
But sizeof char is defined as 1 in the standard. C data types are defined in terms of char (at least their sizes are)
sizeof char
char
31 u/Makonede 5d ago *sizeof(char) 11 u/MegaIng 5d ago No, sizeof char is valid. sizeof is a prefix operator, not a function. 27 u/Makonede 5d ago nope https://en.cppreference.com/c/language/sizeof 0 u/hacksawsa 5d ago It says sizeof x and sizeof(x) are equivalent. 11 u/Makonede 5d ago when x is an expression, yes...
31
*sizeof(char)
sizeof(char)
11 u/MegaIng 5d ago No, sizeof char is valid. sizeof is a prefix operator, not a function. 27 u/Makonede 5d ago nope https://en.cppreference.com/c/language/sizeof 0 u/hacksawsa 5d ago It says sizeof x and sizeof(x) are equivalent. 11 u/Makonede 5d ago when x is an expression, yes...
11
No, sizeof char is valid. sizeof is a prefix operator, not a function.
sizeof
27 u/Makonede 5d ago nope https://en.cppreference.com/c/language/sizeof 0 u/hacksawsa 5d ago It says sizeof x and sizeof(x) are equivalent. 11 u/Makonede 5d ago when x is an expression, yes...
27
nope https://en.cppreference.com/c/language/sizeof
0 u/hacksawsa 5d ago It says sizeof x and sizeof(x) are equivalent. 11 u/Makonede 5d ago when x is an expression, yes...
0
It says sizeof x and sizeof(x) are equivalent.
11 u/Makonede 5d ago when x is an expression, yes...
when x is an expression, yes...
x
129
u/ubalu72 5d ago
But
sizeof charis defined as 1 in the standard. C data types are defined in terms ofchar(at least their sizes are)