在临近2013年全国等级计算机考试中,为了帮助广大考生能够做到全面系统的复习,我们考吧网整理了一些有关于计算机等级考试模拟试题,希望在练习的过程中能给你提供更多的信息解题思路,同时也希望你能够顺利通关。
一、选择题(每题2分,共计70分)
1.下列程序的输出结果是B
struct abc
{ int a, b, c, s;};
main()
{ struct abc s[2]={{1,2,3},{4,5,6}}; int t;
t=s[0].a+s[1].b;
printf("%d",t);
}
A)5
B)6
C)7
D)8
2..设有程序段C
int k=10;
while(k=0)k=k-1;
则下面描述中正确的是
A)while循环执行10次
B)循环是无限循环
C)循环体语句一次也不执行
D)循环体语句执行一次
3..已知学生记录描述为D
struct student
{ int no;
char name[20],sex;
struct
{ int year,month,day;
} birth;
};
struct student s;
设变量s中的“生日”是“1984年11月12日”,对“birth”正确赋值的程序段是
A)year=1984;month=11;day=12;
B)s.year=1984;s.month=11;s.day=12;
C)birth.year=1984;birth.month=11;birth.day=12;
D)s.birth.year=1984;s.birth.month=11;s.birth.day=12;
4..若有定义: char *st= "how are you "; 下列程序段中正确的是A
A)char a[11], *p; strcpy(p=a+1,&st[4]);
B)char a[11]; strcpy(++a, st);
C)char a[11]; strcpy(a, st);
D)char a[], *p; strcpy(p=&a[1],st+2);
5..下列程序的运行结果是B
void fun(int *a, int *b)
{ int *k;
k=a; a=b; b=k;
}
A)6 3
B)3 6
C)编译出错
D)0 0
6下列叙述中正确的是()
A)栈是“先进先出”的线性表
B)队列是“先进后出”的线性表
C)循环队列是非线性结构
D)有序线性表既可以采用顺序存储结构,也可以采用链式存储结构
7支持子程序调用的数据结构是()
A)栈
B)树
C)队列
D)二叉树
编辑推荐: