struct A { int a:2; int b:3; int c:3; }; int main() { struct A p = {2,6,1}; printf("\n%d\n%d\n%d\n",p.a,p.b,p.c); return 0; }
输出为:-2,-2,1
在C complier和C++编译器中输出上述代码的内容是什么?为什么?
c bit-fields
bit-fields ×1
c ×1