#include <stdio.h>
union my_union {
int number;
struct {
unsigned int flag:1;
unsigned int count:3;
} data;
};
int main()
{
union my_union my;
my.data.count=4;
printf("my.flag=%d\n",my.data.flag);
printf("my.count=%d\n",my.data.count);
printf("my.number=%d\n",my.number);
return 0;
}
|