What is sizeof(struct StructT) equal to?
struct StructT {
    uint64_t fieldOne;
    uint8_t fieldTwo;
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
Зворотній Зв’язок
Зареєструйся Зараз
або Підпишись на майбутні тести