幼教  教案  范文  作文  资格考试  高中教学  【网站地图】 【+收藏本站
在线投稿
您当前位置:乐学网资格考试计算机等级考试2017计算机二级考试C语言考前密卷五

2017计算机二级考试C语言考前密卷五

03-06 16:46:30   浏览次数:526  栏目:计算机等级考试
标签:计算机等级考试试题,全国计算机等级考试试题,http://www.lexue88.com 2017计算机二级考试C语言考前密卷五,

A)操作数乘以2

B)操作数除以2

C)操作数乘以4

D)操作数除以4

(40)有以下结构体说明和变量的定义,且指针p指向变量a,指针q指向变量b。则不能把结点b连接到结点a之后的语句是

struct node

{ char data;

struct node *next;

} a,b,*p=&a,*q=&b;

A)a.next=q;

B)p.next=&b;

C)p-》next=&b;

D)(*p).next=q;

(41)下面程序的输出结果是

struct st

{ int x;

int *y;

} *p;

int dt[4]={10,20,30,40};

struct st aa[4]={50,&dt[0],60,&dt[1],70,&dt[2],80,&dt[3]};

main()

{ p=aa;

printf(“%d\n”,++p-》x);

printf(“%d\n”,(++p)-》x);

printf(“%d\n”,++(*p-》y));}

A)10

20

20

B)50

www.lexue88.com

60

21

C)51

60

21

D)60

70

31

(42)下面程序的输出结果是

#include《stdio.h》

#include《string.h》

main()

{char *p1=“abc”,*p2=“ABC”,str[50]= “xyz”;

strcpy(str+2,strcat(p1,p2));

printf(“%s\n”,str);}

A)xyzabcABC

B)zabcABC

C)xyabcABC

D)yzabcABC

(43)以下程序的输出结果是

long fun( int n)

{ long s;

if(n==1||n==2)s=2;

else s=n-fun(n-1);

return s;}

main()

{ printf(“%ld\n”, fun(3)); }

A)1

B)2

C)3

D)4

(44)以下所列的各函数首部中,正确的是

A)void play(var :Integer,var b:Integer)

B)void play(int a,b)

C)void play(int a,int b)

D)Sub play(a as integer,b as integer)

(45)不合法的main函数命令行参数表示形式是

A)main(int a,char *c[])

B)main(int arc,char **arv)

C)main(int argc,char *argv)

D)main(int argv,char *argc[])

(46)有如下程序

main()

{char ch[2][5]={“6937”,“8254”},*p[2];

int i,j,s=0;

for(i=0;i《2;i++)p[i]=ch[i];

for(i=0;i《2;i++)

for(j=0;p[i][j]》′\0′;j+=2)

s=10*s+p[i][j]-′0′;

printf(“%d\n”,s);}

该程序的输出结果是

A)69825

B)63825

C)6385

D)693825

(47)以下程序的输出结果是

union myun

{struct

{ int x, y, z; } u;

int k;} a;

main()

{a.u.x=4; a.u.y=5; a.u.z=6;

a.k=0;

printf(“%d\n”,a.u.x);}

A)4

B)5

C)6

D)0

(48)以下程序的输出结果是

main()

{ char x=040;

printf(“%o\n”,x《《1);}

A)100

B)80

C)64

D)32

(49)C 语言中,系统的标准输入文件是指

A)键盘

B)显示器

C)软盘

D)硬盘

(50)下面的程序执行后,文件test中的内容是

#include 《stdio.h》

void fun(char *fname,char *st)

{ FILE *myf; int i;

myf=fopen(fname,“w” );

for(i=0;i《strlen(st); i++)fputc(st[i],myf);

fclose(myf);}

main()

{ fun(“test”,“new world”); fun(“test”,“hello,”);}

A)hello,

B)new worldhello,

C)new world

D)hello, rld

上一页  [1] [2] 

,2017计算机二级考试C语言考前密卷五
发表评论
发表读后感言(游客无需登录,即可直接发表感言。)
匿名评论  
最新评论所有评论
评论加载中......
相关分类
联系我们 | 网站地图 | 幼教大全 | 免费教案 | 范文大全 | 作文大全 | 资格考试 | 高中教学