欢迎来到天天文库
浏览记录
ID:9304745
大小:2.99 MB
页数:67页
时间:2018-04-27
《全国计算机二级考试c语言模拟试题》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、1套每一套题目都是按照“填空题--改错题---编程题”顺序排列,填空题上面带有两个划线的是人工做题时候多余划线,不要理睬!!#include#include#defineN10doublefun(double*x){inti,j;doubleav,y[N];av=0;/**********found**********/for(i=0;i2、le(i3、]);printf("");}改错题67#includevoidfun(char*s,intnum[5]){intk,i=5;for(k=0;k4、e'u':case'U':{i=4;break;}}if(i>=0)num[i]++;}}main(){chars1[81];intnum1[5],i;printf("Pleaseenterastring:");gets(s1);fun(s1,num1);for(i=0;i<5;i++)printf("%d",num1[i]);printf("");}编程题#include67#defineM4#defineN5intfun(inta[M][N]){inttot=0,i,j;for(i=0;i5、;}for(i=1;i6、");NONO();}voidNONO(){/*请在此函数内打开文件,输入测试数据,调用fun函数,输出数据,关闭文件。*/inti,j,y,k,aa[M][N];FILE*rf,*wf;rf=fopen("K:\k49\24900830\in.dat","r");67wf=fopen("K:\k49\24900830\out.dat","w");for(k=0;k<10;k++){for(i=0;i7、f);fclose(wf);}2、#include#defineN4/**********found**********/voidfun(int___t[][N]___,intn){inti,s;/**********found**********/for(i=0;i
2、le(i3、]);printf("");}改错题67#includevoidfun(char*s,intnum[5]){intk,i=5;for(k=0;k4、e'u':case'U':{i=4;break;}}if(i>=0)num[i]++;}}main(){chars1[81];intnum1[5],i;printf("Pleaseenterastring:");gets(s1);fun(s1,num1);for(i=0;i<5;i++)printf("%d",num1[i]);printf("");}编程题#include67#defineM4#defineN5intfun(inta[M][N]){inttot=0,i,j;for(i=0;i5、;}for(i=1;i6、");NONO();}voidNONO(){/*请在此函数内打开文件,输入测试数据,调用fun函数,输出数据,关闭文件。*/inti,j,y,k,aa[M][N];FILE*rf,*wf;rf=fopen("K:\k49\24900830\in.dat","r");67wf=fopen("K:\k49\24900830\out.dat","w");for(k=0;k<10;k++){for(i=0;i7、f);fclose(wf);}2、#include#defineN4/**********found**********/voidfun(int___t[][N]___,intn){inti,s;/**********found**********/for(i=0;i
3、]);printf("");}改错题67#includevoidfun(char*s,intnum[5]){intk,i=5;for(k=0;k4、e'u':case'U':{i=4;break;}}if(i>=0)num[i]++;}}main(){chars1[81];intnum1[5],i;printf("Pleaseenterastring:");gets(s1);fun(s1,num1);for(i=0;i<5;i++)printf("%d",num1[i]);printf("");}编程题#include67#defineM4#defineN5intfun(inta[M][N]){inttot=0,i,j;for(i=0;i5、;}for(i=1;i6、");NONO();}voidNONO(){/*请在此函数内打开文件,输入测试数据,调用fun函数,输出数据,关闭文件。*/inti,j,y,k,aa[M][N];FILE*rf,*wf;rf=fopen("K:\k49\24900830\in.dat","r");67wf=fopen("K:\k49\24900830\out.dat","w");for(k=0;k<10;k++){for(i=0;i7、f);fclose(wf);}2、#include#defineN4/**********found**********/voidfun(int___t[][N]___,intn){inti,s;/**********found**********/for(i=0;i
4、e'u':case'U':{i=4;break;}}if(i>=0)num[i]++;}}main(){chars1[81];intnum1[5],i;printf("Pleaseenterastring:");gets(s1);fun(s1,num1);for(i=0;i<5;i++)printf("%d",num1[i]);printf("");}编程题#include67#defineM4#defineN5intfun(inta[M][N]){inttot=0,i,j;for(i=0;i5、;}for(i=1;i6、");NONO();}voidNONO(){/*请在此函数内打开文件,输入测试数据,调用fun函数,输出数据,关闭文件。*/inti,j,y,k,aa[M][N];FILE*rf,*wf;rf=fopen("K:\k49\24900830\in.dat","r");67wf=fopen("K:\k49\24900830\out.dat","w");for(k=0;k<10;k++){for(i=0;i7、f);fclose(wf);}2、#include#defineN4/**********found**********/voidfun(int___t[][N]___,intn){inti,s;/**********found**********/for(i=0;i
5、;}for(i=1;i6、");NONO();}voidNONO(){/*请在此函数内打开文件,输入测试数据,调用fun函数,输出数据,关闭文件。*/inti,j,y,k,aa[M][N];FILE*rf,*wf;rf=fopen("K:\k49\24900830\in.dat","r");67wf=fopen("K:\k49\24900830\out.dat","w");for(k=0;k<10;k++){for(i=0;i7、f);fclose(wf);}2、#include#defineN4/**********found**********/voidfun(int___t[][N]___,intn){inti,s;/**********found**********/for(i=0;i
6、");NONO();}voidNONO(){/*请在此函数内打开文件,输入测试数据,调用fun函数,输出数据,关闭文件。*/inti,j,y,k,aa[M][N];FILE*rf,*wf;rf=fopen("K:\k49\24900830\in.dat","r");67wf=fopen("K:\k49\24900830\out.dat","w");for(k=0;k<10;k++){for(i=0;i7、f);fclose(wf);}2、#include#defineN4/**********found**********/voidfun(int___t[][N]___,intn){inti,s;/**********found**********/for(i=0;i
7、f);fclose(wf);}2、#include#defineN4/**********found**********/voidfun(int___t[][N]___,intn){inti,s;/**********found**********/for(i=0;i
此文档下载收益归作者所有