(43) 有如下程序
main0
{ int n[5]={0,0,0},i,k=2;
for(i=0;i printf(“%d\n”,n[k]);
}
该程序的输出结果是
A.不确定的值
B.2
C.1
D.0
(44) 若有以下的定义:int t[3][2];能正确表示t数组元素地址的表达式是
A.&t[3][2]
B.t[3]
C.t[1]
D.t[2]
(45) 有如下程序
main0
{ int a[3][3]={{1,2},{3,4},{5,6}},i,j,s=0;
for(i=1;i<3;i++)
for(j=0;j printf(“%d\n”,s);
}
该程序的输出结果是
A.18
B.19
C.20
D.21
(46) 有如下定义
struct person{char name[9]; int age;};
strict person class[10]={“Johu”, 17,
“Paul”, 19
“Mary”, 18,
“Adam 16,};
根据上述定义,能输出字母M的语句是
A.prinft(“%c\n”,class[3].mane);
B.pfintf(“%c\n”,class[3].name[1]);
C.prinft(“%c\n”,class[2].name[1]);
D.printf(“%^c\n”,class[2].name[0]);
(47) 以下对结构体类型变量的定义中,不正确的是
A.typedef struct aa
B.#define AA struct aa
{ int n; AA {int n;
float m; float m;
}AA; }td1;
AA td1;
C.struct
D.struct
{ int n; { int n;
float m; float m;
}aa; }td1;
stuct aa td1;
(48) 若已建立如下图所示的单向链表结构,
P
data next
在该链表结构中,指针p、s分别指向图中所示结点,则不能将s所指的结点插入到链表末尾仍构成单向链表的语句组是
A.p =p->next; s->next=p; p->next=s;
B.p =p->next; s->next=p->next; p->next=s;
C.s->next=NULL; p=p->next; p->next=s;
D.p=(*p).next; (*s).next=(*p).next; (*p).next=s;
(49) 有如下程序
main()
{ char s[]=”ABCD”, *P;
for(p=s+l; p
}
该程序的输出结果是
A.ABCD
B.A
C.B
D.BCD
BCD B C CD
CD C D D
D D
上一页 [1] [2] [3] [4] [5] [6] 下一页
责任编辑:cyth