1
#include <stdio.h>
struct test
{
    unsigned int x;
    long int y: 33;
    unsigned int z;
};
int main()
{
    struct test t;
    printf("%d",sizeof(t));
    return 0;
}

输出

24

long int 的大小是 8 字节,但这里需要 16 字节,为什么?

4

0 回答 0