32位系统下,对于下面的结构体A和B,sizeof(A), sizeof(B)的结果分别是()
#include <stdio.h> #pragma pack(2) struct A { int a; char b; short c; }; #pragma pack() #pragma pack(4) struct B { char b; int a; short c; }; #pragma pack() int main() { printf(“sizeof(A)=%d, sizeof(B)=%d\n”,sizeof(A),sizeof(B)); return 0; }