What is sizeof(struct StructT) equal to?
struct StructT {
    uint64_t fieldOne;
    uint8_t fieldTwo;
};
Explanation
In this case, the size of the structure in memory is 16 bytes instead of 9, as one might suppose, because each structure "wants to be aligned" in the array, but the standard requires that the array items be "without holes" between them.

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести