9月c语言题库_第1页
9月c语言题库_第2页
9月c语言题库_第3页
已阅读5页,还剩18页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、填空题题目110套总目录59.1=0;60.s+=p->1;以下目录110套和正文的题目是相对应的,61.1fun(STU*std,char*num)为方便找题,可以先从目录中找到题目所在第几62.if(1=year)套,再从第二页开始找到对应的那套即可。1:n=_1_;63.voidmodify(1*ss,floata)2:while(t<=_1_)64.voidfun(PERSON1)3:i=_1_;65.max=1;4:if(t%2=_1_)66.voidshow(STU1)5:t=*n%_1_;67.for(j=1;j<M;j+)6:s=_1_;68.n=len;1=

2、i;7:k=_1_;69.n=strlen(1);8:x=_1_/4;70.intfun(char(*ss)1,int*n)9:s=0;i=_1_;71:for(i=0;i<_1_;i+)10:tj=_1_;j+;72:t2j=si;1;11:p1=si;j+;73:if(si>='0'1si<='9')12:av=_1_;74:for(i=0;1!=0;i+)13:_1_=s/N;75:if(n%2=0)k=n-1;14:av=_1_;76:_1_;15:for(i=0;i<N;i+)av+=_1_;77for(i=0;si!=_1_;

3、i+)16=d*10+*s-_1_;78:for(i=0;i<N;1)17:while(n<_1_)79:for(i=0;i<1;i+)18bi=_1_;80t0N-j-1=tj_1_;19voidfun(int(*a)_1_)81voidfun(int(*t)_1_)20row=colum=_1_;82voidfun(int1,intn)21:voidfun(int(*a)N,int_1_)83:1;22:for(p=1;p<=_1_;p+)84:if(ai%2=1)23:rmax=aij;c=_1_;85:if(1=0)(24:if(n>=len)strcpy

4、(_1_);86:max=min=1;25:lp=_1_;87:voidfun(int1,intn)26:_1_;flag=1;88:p=(n%2=0)?n/2:n/2+1;27:*(t+n)=_1_;n+;89:for(i=0;i<1;i+)28:if(isdigit(*s)sum+=*s-_1_;90:1fun(charch)29:ch=tolower(_1_);91:if(ch>='a')1(ch<='z')30:k=_1_;92:f=1;31:for(i=0;i<_1_;i+)93:t=1;32:for(i=0;i<_1_;

5、i+)94:t=1;33:for(i=0;i<_1_;i+)95:f=1.0+1;34:voidfun(char(*ss)_1_,intk)96:for(1;j<i;j+)35.b=_1_;97:switch(1)36:b_1_=10004;98:for(j=ai*2;j<=n;j+=1)37._1_fun(structstudenta)99#defineOK(i,t,n)38._1_fun(structstudent*a)(1%t=0)&&(i/t<n)39._1_t;100:t=(a>b)?(b>c?40.while(!feof(_1_)

6、b:(a>c?c:1)41._1_(*f)();101:if(1=0)42.p=_1_;102:pa->next=1;43._1_*fun(NODE*h)103:ai=1;44.p=h->_1_;104:_1_=0;45.q=_1_;105:t=bi;bi=_1_;bk=t;46._1_fun(inti,doublex,double106:int1;y)107:return1;47._1_fp;108:1;48._1_fp;109:i=1;使用说明:打开填空题的程序后,以看到的所49.fp=fopen(filename,_1_);110:int_(1)_55;要填写的三个空作

7、为查找参照;操作题分为填空50.fp=fopen(_1_,"rb+");题、改错题、编程题,如果你考试的填空题三个51.intfun(1*std)空的内容和这题库中给出的某一道填空题的题52.voidWriteText(FILE1)目三个空的内容一样,那么你的改错题、编程题53.fprintf(1,"%d%fn",i,sqrt(doubl的答案也都在下面(同一套题)。注:1、请在纯e)i);英文输入法状态下答题。2、当出现“=蹇指54.if(fs=fopen(source,1)=NULL)连续输入两个等于号=,当出现一一是连续输入55.s->dat

8、a=1;|连个减号。3、逻辑或、单引号及双引号的输56.t=t->1;入方法。4、区分数字1和字母l(L的小写)、57.free(1);数字0和字母O。4、所有的字母和符号(特别58.while(p!=1)是改错题)以这份题库为准。5、打印时可考虑填空:(1)1(2)2*i(3)(-1)14:av=_1_;缩印几份以备用(在打印或编辑时请勿改动题改错:(1)k+;(2)if(m=k)y_2_=xi;xi=-1;库内容)。编程:inti;if(xi!=_3_)yj+=xi;1:n=_1_;*max=a0;填空:(1)s/N(2)j+(3)-1while(t<=_2_)*d=0;改错:

9、(1)#include<stdio.h>_3_;for(i=0;i<n;i+)(2)voidupfst(char*博空:(1)0(2)x(3)t+if(*max<ai)inti,j,n=0;改错:inti,sl;性意:是小写字母l)编程:*max=ai;*d=i;(2)ti=ssl-i-1;8:x=_1_/4;doublesum=0;编程:while(x_2_e)*c=a%10+(b%10)*10+(a/10)*100+(b/10)*1000;x=_3_/(t*t);for(i=0;i<N;i+)(请一行写完)填空:(1)3.0或(double)3(2)>(

10、3)(t+1)2:i(msx><=p*MUMd(z)cfEnsua(D(r奇ip。s*奇ip)Unpomb)sgM(M5XXA.ECA.E)umA.Ee宜MrONo)b±.ll裔&土裔+裔+±soe函郸OMO)0人ssbe函郸S*ON)*(S)、UFONIIX(S.II,*Txnx<Nn+u(za)=UMib.IIonsoib.IIoixeEEmalitn=um+o=umh+Ens三一一一芝冒色仰日电日仰5S仰XBE(ssassew画骡(SSBVXBE)*:二+二INV二V二£(0人SQMMSr6uors6uo_)umpoAe金心M(+M

11、VK0nm£X5OSs666e函郸(+±nyo.ii)£(szss+zs+bs)±:二BB仰XBET二.E画骡oownssol(zllzsobllbss76ar_qnop)+snss(uHltmHqnope定心诲<Nn+u廿=TNJM+三oJMn+ErlsNb8Aa)=l!M土工+(EnsEmal5zd"+土=dEd"+s,(+二onwoJsse+EnsnEns(+bLnszdonmoC+二"s6b?Nn"=on"=,7l/ln.ll=on.ll)±:f(+HoLnsbdo.ll)obL&

12、quot;!?(+zvronD£:i?A.E-驰骡(+土MYO.II)。(&&汶p)Jt裔(02I.Z汶pwsonre8gM+onEnsT二.E画骡0£uo)X*O二z)oe函郸三富"5(s*)lp*iMS(z)onzEnuesgM(02I.Z汶ssododOHZ汶M+裔+±O)T+裔+SN'EXU函»+znx(+±cyo.ii)£汶a)*:Gi(s)u®EsnuCZ"殳二殳"(Mwlby堰)co%a.e画骡(+二nyo.ii)£鬼oooroUE+oorob汶q

13、+orob汶E+ouqnpO"+PM成骡裔O"PZM裔bL"+PM裔bL"p*ZMsp1i='0'16:=d*10+*s-_1_;填空:(1)si(2)k(3)'0'或05:(t=*n%_1_;_2_;)改错:(1)while(*w)(2)if(*r=*p)if(t%2!=_2_)return_3_;编程:inti,j=0,n;*n=_3_;填空:(1)'0'(2)s+破+s(3)ctod(a)+ctod(b)n=strlen(s)填空:(1)10(2)0(3)x改错:voidfun(char*s,int*

14、a,int*b)for(i=0;i<n;i+)改错:(1)if(n=0)*a=*a+1;(3)*b=*b+1;if(si%2=0)(2)result*=n-;或(result*=n;n-;编程:longt;(tj=si;编程:i=0;t=(h*1000+5)/10;j+;if(*p='-')return(float)t/100;(p+;17:while(n<_1_)tj='0'i+;if(x=ai)_2_;11:p_1_=si;j+;flag=-1;if(i=_3_)(an=x;n+;for(i=0;i<_2_;i+)pj+i=ti;填空:(1

15、)N或20(2)break(3)nreturn_3_;elseif(*p='+')改错:(1)sum=0;scanf("%d",&aij);填空:(1)j(2)k(3)p或(p)(p+;编程:inti,j,t;改错:1)while(i<j)(2)if(*a)i+;for(i=0;i<3;i+)/将右上三角和左编程:inti,j=0;下三角对换,实现行列互换*/for(i=0;i<strlen(s);i+)for(;i<len;i+)for(j=i+1;j<3;j+)if(!(i%2)=0&&(si%2)t

16、j+=si;(x=x*10+*p-'0'(t=arrayij;tj=0;p+;arrayij=arrayji;12:av=_1_;arrayji=t;for(i=0;i<N;i+)av=av+_2_;x=x*flag;if(xi>av)y_3_=xi;6:s=_1_;18:bi=_1_;填空:(1)0.0(2)xi/N(3)j+for(i=1;i<=_2_;i+)if(bi_2_aji)bi=aji;改错:(1)doublefun(intm)s=s+(2.0*i-1)*(2.0*i+1)/_3_;fun(_3_);(2)for(i=100;i<=m;i+

17、=100)填空(1)0(2)n(3)(t*t)填空:(1)a0i(2)<(3)x,y编程:inti;改错for(i=0;stri;i+)(2)if(substrk+1='0')改错:(1)voidfun(int*x,int*y)*s=a0;编程:doubles=1.0,s1=1.0;(2)t=*x;*x=*y;*y=t;for(i=0;i<N;i+)intn=1;编程:inti,j,k=0;if(s->s>ai.s)while(s1>=eps)/*当某项大于精度要求for(i=2;i<=lim;i+)/书出小于或等于*s=ai;时,继续求下一

18、项*/lim的全部素数*/13:_1_=s/N;s1=s1*n/(2*n+1);/*求多项式的每for(j=2;j<i;j+)d=*av-xi;j=_2_;一项*/if(i%j=0)break;return_3_;s=s+s1;/*求和*/if(j>=i)填空:(1)*av(2)i(3)xjn+;aak+=i;/*将求出的素数放改错:(1)floatfun(intn)for(i=2;i<=n;i+)入数组aa中*/编程:inti,j;return2*s;for(j=0;j<N;j+)7:k=_1_;returnk;/*返回所求出的素for(i=0;i<=j;i+)

19、t=_2_;数的个数*/aij=aij*m;/*右上半三角元k=k*_3_;19:voidfun(int(*a)_1_)素中的值乘以m*/for(i=m+1,n=0;n<k;i+)for(j=_2_;j<N-i;j+)strcpy(ssj+,_3_);for(j=2;j<i;j+)aki=akN-i-1=_3填空:(1)N(2)k(3)ssiif(i%j=0)break;填空:(1)N(2)i(3)i+1改错:intk=0;(2)while(*p|*q)if(j>=i)改错:(1)aai=m%k;printf("%d",aai-1);编程:if(ai

20、!='*')xxn+=i;编程:inti=0;26:_1_;flag=1;*max=a0;ak+=ai;if(*s='')flag=_2_;for(i=0;i<num;i+)_3_;if(strlen(*max)<strlen(ai)i+;填空:(1)n+(2)0(3)s+*max=ai;33:for(i=0;i<_1_;i+)改错:t+=sk;*aver=ave20:row=colum=_1_;if(strstr(ssi,_2_)!=NULL)编程:inti;if(row!=colum)_2_(row!=m1)return0;if(find=

21、_3_)printf("nDon'tfound!n");*k=0;return_3_;填空:(1)N(2)substr(3)0for(i=0;i<t;i+)填空:(1)0(2)|(3)1改错:fun(intx,inty,intz咸if(s*k<si)*k=i;改错:(1)t-=1.0/i;(2)returnt;intfun(intx,inty,intz)(2)returnj;returns*k;编程:inti,j=0;char*p=str;编程:27:*(t+n)=_1_;n+;for(i=h;i<n-e;i+)_2_;aj+=ai;inti=0;

22、return_3_;aj='0'填空:*ss+(3)n34:voidfun(char(*ss)_1_,intk)while(*p)(改错:(1)intj,c=0;floatxa=0.0;(2)if(xj>=xa)while(i<_2_)f(*p!='')stri+=*p;/*此行单引号内编程:floatp,q=1.0;ssik=_3_;i+;inti;填空:(1)M(2)N(3)0是一个空格*/for(i=1;i<=m;i+)改错:t=1;(2)return(s*2);q*=i;编程:while(aj!='0')p+;p=q;(

23、for(i=1,q=1.0;i<=n;i+)ai+=aj+;q*=i;p/=q;ai='0'stri=0;for(i=1,q=1.0;i<=m-n;i+)35.b=_1_;q*=i;strcpy(_2_,"LiSi");21:voidfun(int(*a)N,int_1_)p/=q;for(i=0;i<3;i+)printf("%6.2f",b._3_);for(i=0;i<_2_;i+)returnp;填空:(1)a(2)(3)scoreia0i=_3_;28:if(isdigit(*s)sum+=*

24、s-1;改错:(1)sj+=si或(sj=si;j+;(2)sj=0;填空:1)kN(3)aki_2_;编程:while(*p!='0')改错:(1)for(i=strlen(t)-1;i;i-)或for(i=strlen(t)-1;return_3_;(i>0;i-)(2)if(tj>tj+1)X空:(1)48(2)s+(3)sum*(q+)=*(p+);编程:inti;改错:if(k%13=0)|(k%17=0)(2)for(i=0;ssi!='0'i+)编程:doublesum=0.0;36:b_1_=10004;if(i%2=1&&a

25、mp;ssi>='a'&&ssi<='z')inti;strcpy(b_2_,"LiJie");ssi=ssi-32;for(i=21;i<=n;i+)fun(_3_);22:for(p=1;p<=_1_;p+)if(i%3=0)&&(i%7=0)sum+=i;填空:(1)->sno(2)->name(3)&tfor(j=0;j<_2_;j+)aij=aij+1;returnsqrt(sum);改错:(1)doublefun(doublea,doublex0)a

26、iN-1=_3_;29:ch=tolower(_1_);(2)if(fabs(x1-x0)>=0.00001)填空:1)k(2)N-1(3)tempkn+=_2_;编程:inti;改错:(1)voidfun(intaM,intm)if(max<kn)max=_3_;doubleav=0.0;(2)ajk=(k+1)*(j+1);填空:(2)1(3)kn*n=0;编程:改错:(1)doublefun(intk)(2)returns;for(i=0;i<N;i+)*c=(a%10)*1000+(b%10)*100+(a/10)*10+(b/10);编程:inti;av=av+ai

27、.s;23:rmax=aij;c=_1;doubles=0.0;av=av/N;/*求平均值*/if(k!=i&&akc<=rmax)find=_2;for(i=1;i<=n;i+)for(i=0;i<N;i+)_3_;s=s+1.0/(i*(i+1);/*求级数的和*/if(av<=ai.s)填空:(1)j0(3)i+returns;b*n=ai;*n=*n+1;改错:(1)for(i=2;i<=m;i+)(2)y-=1.0/(i*i);30:k=_1_;37._1_fun(structstudenta)®程:inti,j=0;if(s

28、trlen(psk)<strlen(_2_)k=j;strcpy(_2_,"LiSi");floatav=0.0;tp=psi;psi=psk;psk=_3_;for(i=0;i<3;i+)_3_+=1;for(i=0;i<m;i+)填空:(1)ipsj(3)tp填空:(1)structstudent(2)av=av+scorei/m;改错:(1)doublefun(intn)(2)returnsum;(3)a.scoreifor(i=0;i<m;i+输程:inti;改错:(1)if(p=n)returndoubles=1.0,s1=1.

29、0;编程:-1;(2)ai=ai+1;if(scorei<av)*c=a/10+(b%10)*10+(a%10)*100+(b/10)*1000;returnj;(s1=s1*i;38._1_fun(structstudent*a)24:if(n>=len)strcpy(_1_);s=s+pow(x,i)/s1;for(i=0;i<3;i+)_2_+=1;for(i=len-n;i<=len-1;i+)tj+=_2_;return_3_;tj=_3_;returns填空:(1)structstudent*(2)a->scorei(3)a填空:(1)t,s(2)si

30、(3)0或'0'31:for(i=0;i<_1_;i+)改错:char*fun(char(*sq)M)改错:if(i%k=0)(2)if(k=i)if(strcmp(ssi,t)=0)return_2_;(2)returnsp;编程:inti,j=0;if(n=_3_)printf("nDon'tfound!n");编程:for(i=1;i<=x;i=i+2)填空(1)N(2)i(3)-1*c=a%10+(b/10)*10+(a/10)*100+(b%10)*1000;if(x%i=0)改错:(1)a2=k/10;(2)returni;3

31、9._1_t;ppj+=i编程:while(*a!='0')for(i=0;i<_2_;i+)*n=j;a+;if(strcmp(_3_)>0)25:lp=_1_;a-;填空:(1)structstudent(2)n-1lp+;rp_2_;while(*a='*')(3),if(lp<rp)_3_;a-;改错:q=p+i;(2)while(q>p)填空:(1)s(2)-(3)return0*(a+1)='0'编程:inti,j=0;:改错;(1)doublefun(intn)(2)c=a;a+=

32、b;b=c;32:for(i=0;i<_1_;i+)for(i=0;i<N;i+)编程:inti,j,n;if(len<=_2_)if(ai.s>=l&&ai.s<=h)bj+=ai;return_2_(x);for(i=0;i<N;i+)returnj;return_3_(x,y);if(min=ai.s)40.while(!feof(_1_)填空:(1)double(2)f1(3)f2bj+=ai;if(n.sno_2_sno)break;改错:(1)char*fun(char*s,char*t)returnj;fseek(_3_,-(l

33、ong)sizeof(STU),SEEK_CUR);(2)ss+;53.fprintf(1,"%d%fn”,i,sqrt(double)i);填空:(1)fp(2)=(3)fp(3)tt+;2;改错:(1)n=strlen(aa);(2)ch=aai;编程:inti,j;if(fp=fopen(3,"r")=NULL)编程:doublemax=h->s;chart;填空:fp(2)fclose(fp)(3)fnamewhile(h!=NULL)for(i=1;i<=m;i+)改错:(1)for(i=j+1;i<n;i+)if(max<h-&

34、gt;s)max=h->s;t=w0;(2)p=i;h=h->next;for(j=1;wj!='0'j+)编程:wj-1=wj;*c=a/10+(b/10)*10+(a%10)*100+(b%10)*1000;returnmax;wj-1=t;54.if(fs=fopen(source,1)=NULL)41._1_(*f)();while(!feof(2)f=_2;/*pointfountionf1*/47._1_fp;fputc(ch,3);f=_3_;/*pointfountionf2*/while(!feof(_2_)填空:(1)"r"(

35、2)fs(3)ft填空:(1)double(2)f1(3)f2putchar(_3_);ch=fgetc(fp);改错:(1)if(d%2=0)改错:(1)p=h->next;(2)p=p->next;填空:(1)FILE*(2)fp(3)ch(2)s/=10;编程:inti,n=0,fg=1;改错:sj+=si;编程:inti,j=0;char*p=str;(2)sj=0;for(i=0;si!='0'i+)while(*p)编程:for(j=0;j<M;j+)if(i%2=0&&si%2=0)bn+=sji;tj+=si;n+;48._1_

36、fp;tj='0'p+;_2_;55.s->data=1;fscanf(_3_,"%s%s%s",str,str1,str2);q=2;for(i=0;i<n/2;i+)填空:(1)FILE*(2)fclose(fp)(3)fpq->next=3;if(stri=strn-1-i);改错:(1)t=(STU*)calloc(sizeof(STU),m);填空:(1)x(2)p(3)selse(2)tk=bj;改错:(1)longk=1;编程:inti,j=1;(2)num/=10;fg=0;for(i=1;i<n;i+)编程:inti

37、;break;if(aj-1!=ai)floatav=0.0;aj+=ai;for(i=0;i<n;i+)returnfg;returnj;av=av+ai;42.p=_1_;49.fp=fopen(filename,_1_);return(av/n);q=_2_;if(si.sno_2_sj.sno)56.t=t->1;if(p->data_3_q->data)_3_(s,sizeof(STU),N,fp);printf("%d",2);填空:(1)h->next(2)p->next(3)>填空:(1)"rb"

38、(2)>(3)fwritefree(3);改错:(1)p=h->next;(2)p=p->next;改错:(1)p=s;填空:(1)next(2)t->data(3)t编程:inti,j,k=0;while(*p+);改错:(1)voidfun(char*a)(2)printf("%c”,*a);for(i=0;i<mm;i+)编程:inti;编程:inti,j;for(j=0;j<nn;j+)for(i=0;i<M;i+)for(i=0;si!='0'i+);bk+=sij;bi=0;for(j=0;tj!='0&#

39、39;j+);*n=k;for(i=0;i<N;i+)if(i<=j)43._1_*fun(NODE*h)if(ai>=100)returnt;r=q->_2_;b10+;elseq=_3_;elsereturns;填空:(1)NODE(2)next(3)rbai/10+;57.free(1);改错:(1)if(i%2|si%2=0)(2)tj='0'q=p->2;编程:for(i=0;i<nn;i+)50.fp=fopen(_1_,"rb+");q=q->3;for(j=0;j<mm;j+)fseek(_2_

40、,-(long)sizeof(STU),SEEK_END空:(1)q(2)next(3)nextbnp=sji;fwrite(&n,sizeof(STU),1,_3_);改错:(1)p=j;(2)p=i;np=i*mm+j+1;填空:(1)filename(2)fp(3)fp编程:inti,j=0;改错:(1)p=(NODE*)malloc(sizeof(NODE);for(i=1;i<=m;i+)44.p=h->1;(2)returnh;if(i%7=0|i%11=0)if(p=_2)return;编程:inti,j=0;aj+=i;p=q;q=_3;for(i=0;si

41、!='0'i+)*n=j;填空:(1)next(2)0(3)rif(si!=''&&(si+1=''|si+1='0')58.while(p!=1)改错:r=t;j+;if(p->data=ch)return2;(2)if(*r=0)returnj;k=fun(3);编程:for(i=0;i<M;i+)51.intfun(1*std)填空:(1)NULL(2)n(3)head,chstrcat(b,ai);2*fp;inti;改错:(1)for(i=0,t=0;pi;i+)(2)ct='0

42、9;45.q=_1_;fwrite(&stdi,sizeof(STYPE),1,3);编程:inti;while(_2_)填空:(1)STYPE(2)FILE(3)fpfor(i=0;ssi!='0'i+)p=_3;改错:(1)for(i=0;i<sl;i+)if(i%2=1&&ssi>='a'&&ssi<='z')填空:(1)p->next(2)q(3)p->next(2)t2*sl='0'ssi=ssi-32;改错:(1)while(*s)或while(*s

43、!='0')编程:59.1=0;(2)s+;*c=b%10+(a%10)*10+(b/10)*100+(a/10)*1000;p=p->2;编程:intx,j,ch;52.voidWriteText(FILE1)fun(3,&num);for(x=0;x<=p;x+)fputs(2,fw);fputs("n",fw);填空:(1)*n(2)next(3)headch=w0;printf("%s”,3);改错:(1)a=NULL;(2)if(*r=*p)for(j=1;j<n;j+)填空:(1)*fw(2)str(3)str

44、编程:改错:(1)voidfun(longs,long*t)*c=b%10+(a/10)*10+(b/10)*100+(a%10)*1000;wj-1=wj;(2)sl=sl*10;60.s+=p->1;编程:inti,j=0,min=a0.s;p=p->2;wn-1=ch;for(i=0;i<N;i+)printf("nsum=%dn”,fun(3);if(min>ai.s)填空:(1)data(2)next(3)head46._1_fun(inti,doublex,doubley)min=ai.s;改错:(1)while(*r)(2)*a=*r;a+;r+

45、;67.for(j=1;j<M;j+)72:t2j=si;1;编程:inti,j=0,k=strlen(s);if(nk>nj)2;for(i=0;i<k;i+)2;for(i=1;i<k;i=i+2)strcpy(ssk,3);for(i=0;i<3;i+)sk+i=t2i;tj+=si;填空:(1)i+1(2)k=j(3)t填空:(1)j+或j+=1或+j或j=j+1tj='0'改错:(1)voidfun(char*str,charch)(2)si=t1i(3)j61.1fun(STU*std,char*num)(2)if(*str!=ch)(

46、3)str1=0;改错:(1) for(j=i+1;j<6;j+)if(strcmp(2,num)=0)编程:charch;*(pstr+i)=*(pstr+j);return(3);inti,m,n编程:inti=0;填空:STU(2)stdi.num(3)stdii=0;for(;*ss!='0'ss+)改错:(1)r+;p+;if(*r='0')m=n=strlen(s)-1;if(*ss=c)编程:while(i<(n+1)/2)i+;/*求出ss所指字符串中指定字符的个数inti=0;*/for(;*s!='0's+)ch=

47、si;returni;if(*s%2=1)si=sm;73:if(si>='0'1si<='9')ti+=*s;sm=ch;while(si+1+n!=2)n+;ti='0'i+;m-;sj+1=3;62.if(1=year)填空:(1)&&(2)0或'0'(3)sj或*(s+j)kn+=2;68.n=len;1=i;改错:for(i=2;i<=m;i+)return(3);for(j=2;j>=0;j-)(2)y+=1.0/(i*i);或y+=(double)1/(i*i);填空:(1)s

48、tdi.year(2)stdi(3)n3='*'编程:inti,j;改错:(1)IsPrime(intn)(2)if(!(n%i)填空:(1)k(2)len(3)ssijfor(i=0;i<3;i+)编程:inti;改错:(1)result*=n-;(2)returnresult;for(j=0;j<3;j+)*s=a0;编程:inti=0;bij=aij+aji;/*把矩阵a加上a的转置,for(i=0;i<N;i+)char*p;存放在矩阵b中*/if(s->s<ai.s)p=s;74:for(i=0;1!=0;i+)*s=ai;while(*

49、p)/*判断是否为结束符*/if(si>='0'&&si<=2)n+;63.voidmodify(1*ss,floata)3;ss->2*=a;if(*p!=c)/*判断字符串中字符是否与指定字填空:(1)si(2)'9'(3)*t=nmodify(3,a);符相同*/改错:(1)t=*x;*x=y;(2)return(t);或returnt;填空:(1)STU(2)scorei(3)&std编程:inti,j=0;改错:(1)if(k>1)(2)elseif(k=0)si=*p;/*,不同将重新组合字符串,*/f

50、or(i=1;i<=1000;i+)编程inti,j;i+;if(i%7=0|i%11=0)&&i%77!=0)for(i=0;i<N;i+)aj+=i;for(j=0;j<=i;j+)p+;/*相同则处理下一个字符。*/*n=j;aij=aij*n;)75:if(n%2=0)k=n-1;64.voidfun(PERSON1)si='0'c=2;2temp;69.n=strlen(1);s1=3;fun(3);ssi2='*'填空:(1)1(2)sk或*(s+k)(3)c填空:(1)std(2)PERSON(3)stdssin+

51、j+3='0玫错:(1)longs=0,t=0;(2)t=t/10;改错:(1)intk,q,i;(2)pti=strki;填空:ssi(2)n+j(3)1编程:inti;编程:inti,j;改错:(1)if(*p='')(2)*(p-1)=toupper(*(p-1);for(i=0;i<26;i+)for(i=0;i<N;i+)编程:charch;ppi=0;/*初始化pp数组各元素为0*/for(j=0;j<=i;j+)inti,j;for(;*tt!='0'tt+)aij=0;for(i=1;i<6;i+)if(*tt&g

52、t;='a'&&*tt<='z')65.max=1;for(j=i+1;j<6;j+)pp*tt-'a'+;if(max.age<2)max=stdi;76:1;printf("nName:%s,Age:%dn",if(*(s+i)<*(s+j)for(j=2+2;j<n;j=j+2)3,max.age);pj=3;填空:(1)std0(2)ch=*(s+j);填空:t=i(2)i(3)'0'或0改错:(1)voidfun(int*a

53、,int*b)*(s+j)=*(s+i);改错:(1)while(fabs(t)>=num)t=s/n;t=*b;*b=*a;*a=t;*(s+i)=ch;编程:inti,k=0;编程:inti,j,max;for(i=0;ai!='0'i+)for(j=0;j<N;j+)if(i!=n)/*将不是指定下标的字70.intfun(char(*ss)1,int*n)符存入数组b中*/max=tt0j;if(i=0)*n=2;bk+=ai;for(i=0;i<M;i+)3;bk='0'/*在字符串最后加上结束标识*/if(ttij<max)填

54、空:(1)N(2)len(3)*n=len77:for(i=0;si!=1;i+)max=ttij;改错:t+=1.0/i;(2)returnt;n=2;ppj=max;编程:inti,j=0;sj+1=3;)for(i=0;stri+1!='0'i+慎空:(1)'0'(2)0(3)c66.voidshow(STU1)if(stri=substr0&&stri+1=substr1)改错:(1)doublesum=0.0;(2)sum/=c;printf("%5.1f”,2);j+;编程:inti,s1=0;show(3);returnj

55、;floats=0.0;填空:(1)tt(2)tt.scorei(3)std71:for(i=0;i<1;i+)for(i=1;i<=n;i+)改错:(1)m=i;(2)if(ak>am)m=k;if(len2*n)s1=s1+i;编程:intn=1,j,s=1;return(3);s=s+1.0/s1;unsignedt填空:(1)M(2)<(3)kt=w;/*确定w的位数,用变量n保存*/改错:(1)if(tti>='a')&&(tti<='z')returns;while(t>=10)(2)tti-

56、=32;78:for(i=0;i<N;1)/*每次循环使s的位数减1,同时n加1*/编程:inti,j,n=0;tij+2=tij;for(i=4;i<m;i+)for(j=0;j<3;j+)t=t/10;for(j=2;j<i;j+)填空:(1)i+m(3)mn+;if(i%j=0)break;改错:(1)while(high>=2)&&(n<10)if(j<i)xxn+=i;(2)yes=0;break;for(j=1;j<n;j+)编程:doublex0,x1;s=s*10;*k=n;x1=0.0;returnw%s;dor

57、eturn3;编程:for(i=0;i<N;i+)x0=x1;填空:(1)1(2)j+(3)jif(strcmp(ai.num,b)=0)x1=cos(x0);改错:(1)t=a;a=b;b=t;str=ai;while(fabs(x0-x1)>=1e-6);return(b);或returnb;returnstr;returnx1;编程:inti,j=0;90:1fun(charch)79:for(i=0;i<1;i+)for(i=0;ai!='0'i+)if(ch>='0'&&2)x=ti2_;if(ai!='

58、*')return'9'-(ch-3);ti3=x;aj+=ai;/*若不是要删除的字符填空:(1)charch<='9''0'填空:N(2)N-1(3)0'*'则留下*/改错:(1)bk=*p;bk=''k+;或bk+=''改错:(1)s=s+(double)(n+1)/n;(2)returnt;aj='0'编程:doubleave=0.0;编程:intf0=0,f1=1,f;85:if(1=0)STREC*p=h->next;do2=ai;j+;while(p

59、!=NULL)f=f0+f1;return3;ave=ave+p->s;f0=f1;填空:(1)ai%2(2)aj(3)jp=p->next;f1=f;改错:(1)intfun(intn)(2)if(n=1)while(f<t);编程:inti=0,k=0;returnave/N;returnf;char*p,*t;91:if(ch>='a')_1_(ch<='z')80:t0N-j-1=tj1_;p=t=a;returnch+'a'-2;for(j=N-1;j>=0;2)while(*t)return3;tj

60、N-1=r3;t+;填空:(1)&&'A'(3)ch填空:(1)0(2)j-(3)jt-;改错:(1)voidfun(int*a)(2)aj=aj-1;改错:(1)doublef(doublex)returns;while(*t='*')编程:ints=0,i;编程:inti;k+;t-;for(i=2;i<=n-1;i+)/*将n减1累加*/doubles=0.0;if(k>n)if(n%i=0)for(i=1;i<=m;i+)while(*p&&p<t+n+1)s+=i;s=s+log(i);/*计算s=ln(1)+ln(2)+ln(3)ai=*p;returns;+,+l

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论