struct data{ char t1; 1字节
char t2; 1字节
unsigned short t3; 2字节 空4字节
unsigned long t4; }; 8字节
最大类型为8的整数倍 一共16字节
struct data{ char t1; 1字节 空3字节
int t2; 4字节
short t3; }; 2字节
最大类型为4的整数倍 12字节
struct s1 { char c1; 1字节 空3字节
int i; 4字节
char c2; };1字节 空3字节
最大类型为4 12字节
struct s2 { char c1; 1字节
char c2; 1字节 空2字节
int i; }; 4字节
最大类型为4 8字节
typedef struct Test { short a; 2字节 空6字节
struct { int b; 4字节空4字节
double c; 8字节
char d; } 1字节 空7字节
p; 24字节
int e; 4字节
4 }Test; 4字节 40
typedef struct Test { short a; 2字节空6字节
struct { int b; 4字节 空4字节
double c[10]; 80字节
char d; }; 1字节空7字节
int e; }Test; 4字节
最大类型为8字节 112字节
struct C{ char b; 1字节 空3字节
int a; 4字节
short c; }; 2字节
最大类型为4字节 12字节
struct C { char a; 1字节
char b[3]; 3字节
char c; }; 1字节
最大类型为1字节 5字节
typedef struct { int b; 4字节
char a; 1字节空3字节
long e; 8字节
char c; 1字节 空3字节
float d; 4字节
double t; 8字节
}node; 最大类型为8字节 32字节