The size will be 24 . This is due to the fact that the last element is filled with the number of required bytes, so the total size of the structure must be a multiple of the largest alignment of any member of the structure.
Thus, the addition will look like
typedef struct { double d;
Read the wiki article for more details.
source share