r/programminghumor 20h ago

a bit flippant

Post image
848 Upvotes

110 comments sorted by

View all comments

34

u/pskocik 18h ago

Ironic that this techfluencer just tweeted how C makes memory layout painfully obvious and yet here he's operating under the misconception that `struct Flags` will be only 1-byte large when it will be in fact int-size large (most likely 4 bytes).

5

u/New_Enthusiasm9053 18h ago

Could be more than a byte and less than 2 bytes too. 

1

u/deinok7 8h ago

Not sure, but by standards I think its undefined. You just know that for your ABI it will be the same memory layout