当前位置: 答题翼 > 问答 > 求职面试 > 正文
目录: 标题| 题干| 答案| 搜索| 相关
问题

6写出下列程序在X86 上的运行结果。 struct mybitfields { unsigned short a : 4; unsigned short


6 写出下列程序在X86 上的运行结果。

struct mybitfields

{

unsigned short a : 4;

unsigned short b : 5;

unsigned short c : 7;

}test

void main(void)

{

int i;

test.a=2;

test.b=3;

test.c=0;

i=*((short *)&test);

printf("%d ",i);

}

请帮忙给出正确答案和分析,谢谢!

参考答案
答案整理中……
您可能感兴趣的试题
  • 6写出下列程序在X86 上的运行结果。 struct mybitfields { unsigned short a : 4; unsigned short

  • 7写出下列程序的运行结果。 unsigned int i=3; cout<

  • 7写出下列程序的运行结果。 unsigned int i=3; cout<

  • 8 写出下列程序所有可能的运行结果。 int a; int b; int c; void F1() { b=a*2; a=b; }

  • 以下程序运行后的输出结果是。main(){ char s[]="GEFDCBA"; int p=6;While(s[p]!=’D’){ printf("%

  • 执行下列程序 请写出程序运行结果() n=1 while n>=1 and n2 and n