酷影网 >> 考试资源 >> 计算机二级 >> 99年计算机等级二级笔试C语言真题

99年计算机等级二级笔试C语言真题

(3)为了得到XCOPY命令的在线帮助,可使用的DOS命令文件一为____3____。

(4)在DOS系统下,代表键盘与显示器的设备文件名为____4____。

(5)在DOS系统下,可以直接执行的文件的扩展名除.FXE外,还有两个是____5____。

(6)若想通过以下输入语句使a=5.0,b=4,c=3,则输入数据的形式应该是____6____。

.

.

.

int b,c; float a;

scanf("%f,%d,c=%d",&a,&b,&c);

.

.

.

(7)下列程序的输出结果是_____7____。

#include

main( )

{ char b[30],*chp;

strcpy(&b[0],"CH");

strcpy(&b[1],"DEF");

strcpy(&b[2],"ABC");

printf("%s \n",b);

}

(8)下列程序的输出结果是____8____。

int t(int x,int y,int cp,int dp)

{ cp=x*x+y*y;

dp=x*x-y*y;

}

main( )

{ int a=4,b=3,c=5,d=6;

t(a,b,c,d);

printf("%d %d \n",c,d);

}

(9)下列程序中字符串中各单词之间有一个空格,则程序的输出结果是____9____。

#include

main( )

{ char strl[]="How do you do", *p1=strl;

strcpy(strl+strlen(strl)/2,"es she");

printf("%s \n",pl);

}

(10)以下程序的功能是:从键盘上输入若干个学生的成绩,统计计算出平均成绩,并输出低于平均分的学生成绩,用输入负数结束输入。请填空。

main( )

{ float x[1000], sum=0.0, ave, a;

int n=0, i;

printf("Enter mark:\n");scanf("%f",&a);

while(a>=0.0&& n<1000) { sum+____10____; x[n]=_____11____; n++; scanf("%f",&a); } ave=____12____; printf("output:\n"); printf("ave=%f\n",ave); for( i=0;i main( ) { file *fp; char ch,fname[32]; int count=0; printf("input the filename :"); scanf("%s",fname); if((fp=fopen(____16____,"w+"))==NULL) { printf("can't open file:%s \n",fname); exit(0);} printf("enter data:\n"); while((ch=getchar())!="#"){ fputc(ch,fp); count++;} fprintf(____17____,"\n%d\n", count); fclose(fp); } (13)以下函数creatlist用来建立一个带头节点的单链表,链表的结构如下图所示,新的结点总是插入在链表的末尾。链表的头指针作为函数值返回,链表最后一个节点的next域放入NULL,作为链表结束标志。data为字符型数据域,next为指针域。读入时字符以#表示输入结束(#不存入链表)。请填空。


酷影网(ky530.com)转载请注明出处,http://www.ky530.com/ncre/02/99-NianJiSuanJiDengJiErJiBiShi-C-YuYanZhenDi-dpl1024.html
关键词:


精华推荐
热门文章
最新文章