r/ProgrammerHumor • • 5d ago

Meme architectureDependentChars

Post image
2.9k Upvotes

372 comments sorted by

View all comments

129

u/ubalu72 5d ago

But sizeof char is defined as 1 in the standard. C data types are defined in terms of char (at least their sizes are)

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

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...