古风abo:共用体``

来源:百度文库 编辑:高考问答 时间:2024/05/11 05:21:05
已知字符0的ASCII码为十六进制的30,下面程序
main()
{
union{
unsigned char c;
unsigned int i[4];
}z;
z.i[0]=0x39;
z.i[1]=0x36;
printf("%c\n",z.c);
}
的输出是______。

c和i[0]共用一段内存,0x39是十六进制39,比30大9,恰是字符9

9