有以下程序 main() { union { char ch[2]; int d; }s; s.d=0x4321; printf("%x,%x\n",s.ch[O],s.ch[1]); } 在16位编译系统上,程序执行后的输出结果是______。
A.21,43
B.43,21
C.43,00
D.21,00
第1题:
有以下程序: main { union { char ch[2]; int d; }s; d=0x4321; printf("%x,%x\n",S.ch[0],S.ch[l]); } 在16位编译系统上,程序执行后的输出结果是( )
A.21,43
B.43,21
C.43,00
D.21,00
第2题:
有以下程序:
main
{ union
{ char ch[2];
int d;
}s;
d=0x4321;
printf("%x,%x\n",S.ch[0],S.ch[l]);
}
在16位编译系统上,程序执行后的输出结果是( )
A.21,43
B.43,21
C.43,00
D.21,00
第3题:
有以下程序: #include <stdlib.h> void fun(int * s,int * * d) { * *d=*(s+2); } main() { int a[]={1,2,3,4,5},*b; b=(int *)malloc(sizeof(int)); fun(a,&B) ; printf("%d\n",*b+1); } 程序的输出结果是( )
A.2
B.3
C.4
D.5
第4题:
有以下程序: #include <stdio.h> main() { union { charch[2]; int d; } s; s.d=0x4321; printf("%x,%x\n",s.ch[0],s.ch[1]); } 在16位编译系统上,程序执行后的输出结果是( )。
A.21,43
B.43,21
C.43,00
D.21,00
第5题:
有以下程序: #include <stdio.h> union pw { int i; char ch[2]; } a; main() { a.ch[0]=13; a.ch[1]=0; printf("%d\n",a.i); } 程序的输出结果是(注意:ch[0]在低字节,ch[1]在高字节)( )。
A.13
B.14
C.208
D.209