c语言的结构体字节数统计

struct结构体的字节数 等于 结构体中最大类型的字节数的倍数。


如: 
typedef struct Student
{
    short id; //2个字节
    char name[15]; //1*15个字节
    int age; //4个字节
    char num; //1个字节
} Student;

总共28个字节。

原文地址:https://www.cnblogs.com/xclidongbo/p/3805407.html