In order to meet the alignment requirement, sizeof(MyStruct) has to equal a multiple of 16 bytes, so if sizeof(float) = 4 and you have 3 fields in the struct, then sizeof(MyStruct) = 16. What else could it be?
Use sizeof(MyStruct) to get the size of the structure.
Use sizeof(member) to get the size of a member in the structure.
Use offsetof(struct, member) to get the offset in bytes from the start of the structure.
If you allocate an array
MyStruct s[4] the compiler will correctly add the padding.
If you want to malloc an array of MyStruct then make sure to use sizeof(MyStruct) when calculating the size. You should never use the sum of the size of the children to determine the size of a structure.