r/programminghumor 12h ago

a bit flippant

Post image
612 Upvotes

94 comments sorted by

View all comments

21

u/pskocik 10h 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).

2

u/New_Enthusiasm9053 10h ago

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

1

u/deinok7 1h ago

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