内容发布更新时间 : 2025/6/11 0:39:17星期一 下面是文章的全部内容请认真阅读。
{ t.x=10; t.s=\computer\; return 0; } main()
{ t.x=1; t.s=\minicomputer\;
func(t); printf(\%d,%s\\n\,t.x,t.s); }
A 10,computer B 1,minicomputer C 1,computer D 10,minicomputer 10 下列程序的输出结果是__B_。
#include
{ int i[2]; long k; char c[4]; }t,*s=&t; s->i[0]=0x39; s->i[1]=0x38;
printf(\%lx \,s->k); printf(\%c\\n\,s->c[0]); }
A 390038 39 B 380039 9 C 3938 38 D 3839 8 11 若已定义了如下的共用体类型变量x,则x所占用的内存字节数为_C__。
union data { int i; char cha; double f; }x;
A 7 B 11 C 8 D 10 12 如下说明语句:
enum A {A0=1,A1=3,A2,A3,A4,A5}; enum A B;
执行 B=A3; printf(\%d\\n\,B); 输出是_A__。
A 5 B 3 C 2 D 编译时出错 13 有以下说明语句,则结构变量s的成员num的不正确引用是_B__。
struct student { int num; int age; }s,*p;
A s.num B *p.num C p->num D (*p).num 14 以下各选项试图说明一种新的类型名,其中正确的是 C 。
A typedef integer int; B typedef integer=int; C typedef int integer; D typedef int=integer; 15 运行下面程序,其输出结果是_C__。
#include
{ int a,b; char *ch; }; main()
{ struct sample arg;
arg.a=1000;arg.b=100;arg.ch=\abcd\; f1(arg);
32
}
f1(struct sample param) { param.a+=param.b; param.ch[2]='x';
printf(\%d\\n\,param.a); printf(\%s\\n\,param.ch); }
A 1000 B 1100 C 1100 D 100 abcd abcd abxd abcd 16 fwrite函数的一般调用形式是__D_。
A fwrite(buffer,count,size,fp);