#include"stdio.h" typedef struct { unsigned char b:4; unsigned char c:4; }tow; typedef union TWO { unsigned char a; tow yy; }; void main(void) { union TWO xx; xx.a=0x35; printf("b=%d\n",xx.yy.b); printf("c=%d\n",xx.yy.c); while(1); }
收藏0 举报
#include"stdio.h" typedef struct { unsigned char b; unsigned char c; }tow; typedef union TWO { unsigned int a; tow yy; }; void main(void) { union TWO xx; xx.a=0x3521; while(1); }
本版积分规则 发表回复 回帖并转播 回帖后跳转到最后一页
214
3375
7
扫码关注 21ic 官方微信
扫码关注嵌入式微处理器
扫码关注电源系统设计
扫码关注21ic项目外包
扫码浏览21ic手机版
本站介绍 | 申请友情链接 | 欢迎投稿 | 隐私声明 | 广告业务 | 网站地图 | 联系我们 | 诚聘英才
京公网安备 11010802024343号