struct st{    int *p;    int i;    char a;};int sz=sizeof(struct st); | 
24
20
16
14
13
12
答案:C 错选:F
32位编译器:
      char :1个字节
       char*(即指针变量): 4个字节(32位的寻址空间是2^32, 即32个bit,也就是4个字节。同理64位编译器)
      short int : 2个字节
      int: 4个字节
      unsigned int : 4个字节
      float: 4个字节
      double: 8个字节
      long: 4个字节
      long long: 8个字节
      unsigned long: 4个字节
64位编译器:
      char :1个字节
      char*(即指针变量): 8个字节
      short int : 2个字节
     int: 4个字节
      unsigned int : 4个字节
      float: 4个字节
      double: 8个字节
      long: 8个字节
      long long: 8个字节
此处指针先占用8字节。int占用4字节,满足要求不用补齐,char占用一个字节,同时总的字节数必须满足8的倍数即16
原文:https://www.cnblogs.com/kxzh/p/9143973.html