为什么结构占用的 space 比它需要的多?

Why structs took more space than it needs?

我看到当我检查结构的大小时它占用了 36 个字节,但相同的变量(没有结构)占用了 33 个字节。 为什么?

sizeof(struct) >= sum of all the structure members.

因为对齐可能有额外的填充 requirements.That 是您看到结构的大小比您想象的要大的原因。