题目内容

下面程序的运行结果为:main( ){ union example{ struct{ int x;int y;}in;int a;int b;}e;e.a=1;e.b=2;e.in.x=e.a*e.b;e.in.y=e.a+e.b;printf("%d,%d\n",e.in.x,e.in.y);}

查看答案
更多问题

下面程序的运行结果为:struct tag{ char low;char high; };union word{struct tag byte;short word; }w;main( ){ w.word=0x6b7d;printf("word value:%x\n",w.word);printf("low value:%x\n",w.byte.low);printf("high value:%x\n",w.byte.high);w.byte.high=0x56;printf("word value:%x\n",w.word);}

下面程序的运行结果为:#include union p{int i;char c[2];}x;main(){x.c[0]=13;x.c[1]=0;printf("%d\n",x.i);}

下面程序的运行结果为:main(){ union{long i;int k;unsigned char s;}abc;abc.i=0x12345678;printf("%x\n",abc.k);printf("%x\n",abc.s);}

下面程序的运行结果为:main( ){union bt{int k;char c[2];}a;a.k=-7;printf("%o,%o",a.c[0],a.c[1]);}

答案查题题库