struct w{ char low;char high;};union u{ struct w byte;short word;}uw; main( ){ i
struct w
{ char low;
char high;
};
union u
{ struct w byte;
short word;
}uw;
main( )
{ int result;
uw.word=0x1234;
printf(“word value:%04x\n”,uw.word);
printf(“high byte:%02x\n”,uw.byte.high);
printf(“low byte:%02x\n”,uw.byte.low);
uw.byte.low=0x74;
printf(“word value:%04x\n”,uw.word);
result=uw.word+0x2a34;
printf(“the result:%04x\n”,result);
}
正确答案:5.word value:1234
词条内容仅供参考,如果您需要解决具体问题
(尤其在法律、医学等领域),建议您咨询相关领域专业人士。
