If you’ve got a struct within a struct, say:
struct {
double a;
struct {
char *b[20];
char c;
}d;
}e;
will struct e need to start on a multiple of the size of struct d, or a multiple of the size of the largest member of d (char *b[20])?
It’s compiler- and settings-dependent. In most cases will start at the first member’s granularity, which in your case is
sizeof(char*). Note, that it’s notsizeof(char*) * 20, since it’s an array and not a native type. Also note that in your case, thestruct ewill always start at least at granularity ofsizeof(double), and thereforestruct dwill do too.