免费注册 手机版 网站地图 小工具

学而优·知识库

首 页
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);
}
参考答案

关闭

前往注册

我已注册,登录账号 继续查看答案