69,382
社区成员
发帖
与我相关
我的任务
分享
typedef struct{
long num; // 4 bytes
char *name; // 4 bytes;
short int data; //2 bytes
char ha; // 1 bytes
//因为short需要从2的倍数开始,所以这里空余 1byte
short ba[5]; //10 bytes
//因为int需要从4的整数倍开始,所以这里空余 2bytes
int crc; // 4bytes
}info_t;
info_t *p;
typedef struct{
long num; // 4 bytes
char *name; // 4 bytes;
short int data; //2 bytes
char ha; // 1 bytes
//因为short需要从2的倍数开始,所以这里空余 1byte
short ba[5]; //10 bytes
//因为int需要从4的整数倍开始,所以这里空余 2bytes
int crc; // 4bytes
}info_t;
info_t *p;
typedef struct{
long num; // 4 bytes
char *name; // 4 bytes;
short int data; //2 bytes
char ha; // 1 bytes
//因为short需要从2的倍数开始,所以这里空余 1byte
short ba[5]; //10 bytes
//因为int需要从4的整数倍开始,所以这里空余 2bytes
int crc; // 4bytes
}info_t;
info_t *p;