单选题

如下程序在x86_64位系统下运行,d的输出结果是() #include&...

发布于 2022-03-03 15:13:26

如下程序在x86_64位系统下运行,d的输出结果是()

#include<stdio.h>
struct bitfields {
     unsigned short a:4
     unsigned short b:5
     unsigned short c:7
} test
int main(int argc, char *argv[])
{
      int d = 0
     test.a = 2
     test.b = 3
     test.c = 0 
d = *((unsigned short *)&test)
printf("%d\r\n", d)
return 0
}


登录后免费查看答案
关注者
0
被浏览
71
知识点
面圈网VIP题库

面圈网VIP题库全新上线,海量真题题库资源。 90大类考试,超10万份考试真题开放下载啦

去下载看看