#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); } 高字节出现在了低位地址的变量。
收藏0 举报
#include"stdio.h" typedef struct { unsigned char b1:1; unsigned char b2:1; unsigned char b3:1; unsigned char b4:1; unsigned char c:4; }tow; typedef union TWO { unsigned char a; tow yy; }; void main(void) { union TWO xx; xx.a=0x35; while(1); }
本版积分规则 发表回复 回帖并转播 回帖后跳转到最后一页
143
1720
3
扫码关注 21ic 官方微信
扫码关注嵌入式微处理器
扫码关注电源系统设计
扫码关注21ic项目外包
扫码浏览21ic手机版
本站介绍 | 申请友情链接 | 欢迎投稿 | 隐私声明 | 广告业务 | 网站地图 | 联系我们 | 诚聘英才
京公网安备 11010802024343号