C语言中的结构体所占的字节数 ,用sizeof求一个结构体的大小 C语言中用sizeof求结构体所占字节数的详细方法。 一、非嵌套结构体 struct one{ char a; // 1(char所占字节数) + 0(偏移量) short b; // 2(short所占字节数) + 2(偏移量) int c; // 4(int所占字节数) + 4(偏移量) }; struct two{ char a; // 1 + 0 int c; // 4 + 4 short b;// 2 + 8 };</