二级c语言终极精简版(TwolevelClanguageultimateLite)_第1页
二级c语言终极精简版(TwolevelClanguageultimateLite)_第2页
二级c语言终极精简版(TwolevelClanguageultimateLite)_第3页
二级c语言终极精简版(TwolevelClanguageultimateLite)_第4页
二级c语言终极精简版(TwolevelClanguageultimateLite)_第5页
已阅读5页,还剩60页未读 继续免费阅读

下载本文档

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

文档简介

二级c语言终极精简版(TwolevelClanguageultimateLite)

1.Fillintheblanks

Functionvalue1.917915

Error:thisvalueislow3value625

Programming:outputis:S=l.100000

Part01fillintheblanks:[1.1.1]x

[1.1.2]n

[1.1.3]Fabs(T)

Errorcorrectionproblem:[1.2.1]for(i=l;i<=y;i++)

[1.2.2]t=t%1000;

Programming:

1,

Doublefun(doublex)

Inti=0;

Doubles=l,a=l;

While(Fabs(a)>0.000001)

(

A=a*(0.5-i)*x/(i+1);

S+=a;

I++;

)

Returns;

)

2,programfillintheblanks:Cl=3C2=lC3=2

Error:iftheinputunsignedinteger30800

Programming:S=l.718282

Part02fillintheblanks:[2.1.1]n%10

[2.1.2]break

[2.1.3]break

Errorcorrectionproblem:[2.2.1]if(t==0)

[2.2.2]*zero=count

Programming:

Doublefun(intn)

(

Inti;

Doubles=0,a=l;

For(i=l;i<=n;i++)

(

A=a/i;

S+=a;

}

Returns;

)

3.Fillintheblanks:thereturnvalueofthefunctionis:64862

Error:thenumberis:7530

Programming:tring

Part03fillintheblanks:[3.1.1]0

[3.1.2]10*x

[3.1.3]n/10[3.2.1]*t=0:errorcorrectionproblem;

[3.2.2]if(d%2!=0)

Programming:voidfun(charpl[],charp2[])

(

While(*pl)pl++;

While(*p2)

(

*pl=*p2;

P1++;

P2++;

*pl=0;

4.Fillintheblanks:theresultoftheprogramexecutionis:

find:a[2][2]=9

Canbeoutput:0.536389

Programming:datashouldbe:10,20,30,40.

Part04fillintheblanks:[4.1.1]J

[4.1.2]0

[4.1.3]i++

Errorcorrectionproblem:[4.2.1]for(i=2;i<=m;i++)

[4.2.2]y-=1.0/i/i;

Programming:

Intfun(intscore[],intm,intbelow[])

(

Inti=0,s=0,n=0;

For(i=0;i<m;i++)s+=score[i];

S/=m;

For(i=0;i<m;i++)

If(score[i]<s)

Below[n]=score[i];

N++;

)

)

Returnn;

)

5.Fillintheblanks:lessthanM.

Error:=3.140578

Programming:****A*BC*DEF*G****

Part05fillintheblanks:[5.1.1][M]

[5.1.2]N

[5.1.3]0

Errorcorrectionproblem:[5.2.1]t=l;

[5.2.2]return(2*s);

Programming:voidfun(char*a,intn)

(

Thefollowingcodeforreference*//*

Inti=0,J,k=0;

While(a[k]=='*')k++;/*k**statisticsthenumberof

characters

If(k>n)

(

I=n;j=k;

Thefollowingcompletionofthesubscriptk/*totheendof

thestringofcharactersforwardK-Nposition.

While(a[j])

(

A[i]=a[j];

I++;

J++;

}

A[i]=O;

}

)

6.Fillintheblanks123

456

786

Error:functionvalue:-3.50

Programming:A*BC*DEF*G****

Part06fillintheblanks:[6.1.1][N]

[6.1.2]t[i][j]

[6.1.3]

Errorcorrectionproblem:[6.2.1]ttdefineFU(m,n)((m)/(n))

[6.2.2]return(value);

Programming:voidfun(char*a)

Inti=0,j=0;

While(a[i]=='*')i++;

While(a[i])

(

A[j]=a[i];

I++;

J++;

)

A[j]=O;

)

7,fillintheblanks:123

456

789

101112

Part07fillintheblanks:[7.1.1]K

[7.1.2]N

[7.1.

3]a[k][i]

Errorcorrectionproblem:[7.2.1]for(I=strlen(T)-1;I;

i一)

[7.2.2]if(t[j]>t[j+1]

Programming:voidfun(char*ss)

(

Inti=l;

While(ss[i-l]&&ss[i])

(

If(ss[i]>=,a&&ss[i]<=,z)ss[i]+='A'-'a';

I+=2;

8.Fillintheblanks:thesumof27is:999.Only1

Error:Tlevelisstillhigh,lowlevelisstilllow

Programming:highmarksbefore

Part08fillintheblanks:[8.1.1]999

[8.1.2]t/10

[8.1.3]x

Errorcorrectionproblem:[8.2.1]voidfun(longs,long*t)

[8.2.2]while(s>0)

Programming:voidfun(STRECa[])

(

STRECtmp;

Inti,j;

For(I=0;I<N;i++)

For(J=i+1;J<N;j++)

Pleasecompletethefollowingcode{/**/accordingtothe

topicrequest

If(a[i].s<a[j].s)

Tmp=a[i];a[i]=a[j];a[j]=tmp;

}

)

)

9.Fillintheblanks:thereturnvalueofthefunctionis30.

Errorcorrection:withavalueof2.000.

Programming:****ABCDEFG********

Part09fillintheblanks:[9.1.1]sum=0

[9.1.2]t[i][i]

[9.1.3]1

Errorcorrectionproblem:[9.2.1]doubler;

[9.2.2]while(Fabs(m-n)>0,001)

Programming:

Voidfun(char*a,char*h,char*p)

A=h;

While(H!=p)

(

If(*h='*'!)

(

*a=*h;

A++;

}

H++;

}

While(*p)

(

*a=*p;

A++;

P++;

*a=0;

}

10.Fillintheblanks:〃9〃to〃0〃“;

Error:ABCDEFGHIJK

Programming:theaveragescoreshouldbe78.625

Tenthsetsofclozequestions:[10.1.1]char

[10.1.2]ch<='9'

[10.1.3]'O'

Errorcorrectionproblem:[10.2.1]b[k]=*p;

[10.2.2]b[k]='';k++;

Programming:DoubleFun(STREC*h)

Inti=0;

Doubles=0;

While(h->next)

(

H=h->next;

S+=h->s;

I++;

)

S/=i;

Returns;

}

11.Fillintheblanks:thereturnvalueofthefunctionis

2.985678

Error:ABCDDCBA

Thecontentsofthearrayshouldbe:"135〃”

Eleventhsetsofclozequestions:[11.1.1]0

[11.1.2]i++

[11.1.3]2.*i

Errorcorrectionproblem:[11.2.1]voidfun(char*s,char*t)

[11.2.2]t[2*d]=0;

Programming:voidfun(char*s,chart[])

(

Inti=0,j=0;

While(s[i])

(

If(i%2==l&&s[i]%2==l)

(

T[j]=s[i];

J++;

)

I++;

T[j]=O;

12,fillintheblanks:ifyoucan,tfindanything,don,tdo

it.

Error:stringtobesortofhavebeengiveninthemainfunction.

Programming:findingthehighestscoreofstudents,returning

fromfunctionvalues.

Twelfthsetsofclozequestions:[12.1.1](FP)

[12.1.2]==

[12.1.3]FP

Errorcorrectionproblem:[12.2.1]n=strlen(AA);

[12.2.2]ch=aa[i];

Programming:

Doublefun(STREC*h)

(

Doubles=0;

While(h->next)

H=h->next;

If(s<h->s)s=h->s;

)

Returns;

}

13.programfillintheblanks:ifthereis,fornonNULL.

Error:theoutputshouldbe:330.

Programming:A*BC*DEF*G

Thirteenthsetsofclozequestions:[13.1.1]N

[13.1.2]substr

[13.1.3]0

Errorcorrectionproblem:[13.2.1]fun(intx,inty,intz)

[13.2.2]returnj;

Programmingquestions:voidfun(char*a,intn,inth),

int(e)

inti;

for(i=0;i<n-h-e;i++)[i]=a[i+h];

the[i]=0;

)

14、程序填空题:将a所指3*5矩阵中第k列的元素

改错:根据形参m的值(=2<m<=9)

编程:c=5241.

第14套填空题:[14.1.1]k

[14.1.2]n-1

[14.1.3]temp

改错题:[14.2.1]voidfun(inta[][m],intm)

【14.2.2]a[j],[k]=(r+1)*(j+1);

编程:

voidfun(inta,intb,long*(c)

*(c=a/10*10*10+%/1000+b+b10*10to100%;

}

15、程序填空题:中数为4.

改错:则转换为小写字母b

编程:s=534.188884

第15套填空题:[15.1.1]a

[15.1.2]a

[15.1.3]b

改错题:[15.2.1]c=tolower(c);

[15.2.2]c=c+5;

编程:

doublefun(intn)

(

inti;

doubles=0,anda=0;

for(i=1;i<=n;i++)

the+=sqrt(s);

s+=a;

)

returns;

)

16、程序填空题:并将转换的结果作为函数值返回.

改错:例如输入1、2、3、4,

:=sum编程763.

16套填空题:[16.1.1]&&

the[16.1.2]''

[16.1.3]ch

改错题:[16.2.1]voidfun(int*)

[16.2.2]a[j]=a[j]-1;

编程intfun(intn)

inti=0,,,,,,and;

for(i=2;i<n;i++)

(

if(n==0%s+i)=i;

)

returns;

)

17、程序填空题:输出的结果为:22

改错:则函数值为4622.

编程:s-4

第17套填空题:[17.1.1]48

[17.1.2]s++

[17.1,3]sum

改错题:[17.2.1]if((k=13%(k=0)||17%==0))

[17.2.2]}

编程:doublefun(intn)

(

inti=0,,,,,,and;

for(i=21;i<n;i++)

(

if(i%3==0&&i%7==0)=s+i;

}

returnsqrt(s);

)

18、程序填空题:函数值为:1.917914.

改错:k的值代表黑球数.

编程:1但不大于100.

第18套填空题:[18.1.111

[18.1.2]-1

[18.1.3]t

改错题:[18.2.1]for(i=1;i<=3;i++)

[18.2.2]if(r>=0&&k<=6)

编程:doublefun(intn)

(

inti;

doubles=1,a=1;

for(i=1;i<=n;i++)

(

a=a/i,;

s+=a;

}

returns;

}

19、程序填空题:字符串为:defgh.

改错:m且紧随m的素数,

编程:他们是:1、5、7、35.

【19.1.1】t第19套填空题:,,,,,,and

[19.1.2]s[i]

[19.1.3]0

改错题:[19.2.1]if(i%r==0)

[19.2.2]if(r>=i)

编程:voidfun(intx,intpp口,int*n)

(

inti;

for(i=1,n=0;i<=x+=2;(i)

(

if(x%i==0)

(

[pp]=i*n;

(*n)++;

20、程序填空题:96、81、89.

改错:所找到的最长字符串在主函数中输出.

编程:c=2415.

第20套填空题:[20.1.1】structstudent*

[20.1.2]a->[]score)

[20.1.3]a

改错题:[20.2.1]charfun(char*(*sq)[m].

[20.2.2]returnsp;

编程:voidfun(inta,intb,long*(c)

(

*c=100%*/10+10+10+10*(b/b10*1000%;

21、程序填空题:数据排列为:9、1、4、2、3、6、5、8、7;

改错:数值为:12.

编程:他的平均分应当是:87.875.

Twenty-firstsetsofclozequestions:[21.1.1]a

[21.1.2]a[j]

[21.1.3]a[j]

Errorcorrectionproblem:[21.2.1]switch(g)

[21.2.2]case1:return1;case2:return1;

21,

Voidfun(STREC*a)

(

Inti;

Doubles=0;

For(i=0;i<N;i++)s+=a->s[i];

A->ave=s/N;

22,programfillintheblanks:thefunctionofthefunction

is:N*Nmatrixmain6diagonalelementsinthevalueofthe

reversediagonalcorrespondence

Error:untillowandhigh,findtheend.

Programming:ABCDEFG*******

Twenty-secondsetsofclozequestions:[22.1.1]t[][N]

[22.1.2]i=0;i<n

[22.1.3]s

Errorcorrectionproblem:[22.2.1]fun(inta[],intm)

[22.2.2]elseif(m>a[mid])

Programming:voidfun(char*a,char*p)

(

Char*b=a;

While(b<p)

If(*b='*'!)

*a=*b;

A++;

)

B++;

)

While(*p)

(

*a=*p;

A++;

P++;

}

*a=0;

)

23.Fillintheblanks:thedataarearrangedasfollows:9,

1,8,2,7,3,6,4,5.

Cannotthelast4elementsfortheaverage.

Programming:thenumberofstudentsbelowtheaverageis

returnedbytheparametern,andtheaverageisreturnedbythe

functionvalue.

Twenty-thirdsetsofclozequestions:[23.1.1]*a

[23.1.2]2

[23.1.3]i+1

Errorcorrectionproblem:[23.2.1]sum=0;

[23.2.2]if((i+l)%5==0)

Programming:oublefun(STREC*a,STREC*b,int*n)

(

Inti;

Doubles=0;

For(i=0;i<N;i++)s+=a[i].s;

S/=N;

For(i=0,*n=0;i<N;i++)

If(a[i].s<s)

B[*n]=a[i];

(*n++);

}

}

Returns;

}

24programfillintheblanks:functionvalueis:12.182494.

Error:thelow3digitandthevalueis15.

Programming:s=35..951014

Twenty-fourthsetsofclozequestions:[24.1.1]x

[24.1.2]n

[24.1.3]t

Errorcorrectionproblem:[24.2.1]d=l;s=0;

[24.2.2]d=d/10;

Programming:DoubleFun(doublex[9])

Inti;

Doubles=0;

For(i=0;i<8;i++)s+=sqrt((x[i]+x[i+l])/2);

Returns;

)

25.fillintheblanks:functionvalue:12.182340.

Error:thenumberasafunctionreturnvalue.

Programming:s=l1730729.

Twenty-fifthsetsofclozequestions:[25.1.1]1

[25.1.2]1

[25.1.3]I

Errorcorrectionproblem:[25.2.1]k=i;

[25.2.2]c=k;

Programming:DoubleFun(doublex[10])

Inti;

Doubles=0,xl=0;

For(i=0;i<10;i++)xl+=x[i];

Xl/=10;

For(i=0;i<10;i++)s+=(x[i]-xl)*(x[i]-xl);

S=sqrt(s/10);

Returns;

}

26,fillintheblanks:10004,“Lijie”,93,85,87.

Error:thesquarerootvalueis:1.414214.

Programming:thenumberofstudentsaboveorequaltothe

averageisreturnedbytheformalparametern.

Twenty-sixthsetsofclozequestions:[26.1.1]->sno

[26.1.2]->name

[26.1.3]&t

Errorcorrectionproblem:[26.2.1]doublefun(doublea,double

xO)

[26.2.2]if(Fabs(xl-xO)>0.00001)

Programming:DoubleFun(STREC*a,STREC*b,int*n)

(

Inti;

Doubles=0;

For(i=0;1<N;i++)s+=a[i].s;

S/=N;

For(i=0,*n=0;i<N;i++)

(

If(a[i].s>=s)

(

B[*n]=a[i];

(*n++);

Returns;

)

27,programfillintheblanks:functionreturns:-0.204491.

Error:return0outputNO.

Programming:themaximumvaluestoredinindexisthesubscript

ofelements.

Twenty-seventhsetsofclozequestions:[27.1.1]1

[27.1.2]2*i

[27.1.3](-1)

Errorcorrectionproblem:[27.2.1]k++;

[27.2.2]if(m==k)

Programming:voidfun(inta[],intn,int*max,int*d)

Inti;

For(i=l,*max=a[0],*d=0;i<n;i++)

If(*max<a[i])

(

*max=a[i];

*d=i;

)

}

)

28.Fillintheblanks:functionreturns:9.612558

Error:stringasshouldoutput2.

Programming:theprogramoutputis3.14....

Twenty-eighthsetsofclozequestions:[28.1.1]0

[28.1.2]n

[28.1.3](t*t)

Errorcorrectionproblem:[28.2.1]for(i=0;str[i];i++)

[28.2.2]if(substr[k+l]==O)programming:DoubleFun(double

EPS)

(

Inti=l;

Doubles=l,a=l;

While(a>eps)

(

A=a*i/(2*i+l);

S+=a;

I++;

)

Returns*2;

29,theprogramfillsupthetopic:String:abcABsmaxlesserror:

functionvalueshouldbe:1.533852.

Programming:forexample,n=10,thefunctionvalueis:

0.909091.

Twenty-ninthsetsofclozequestions:[29.1.1]*s

[29.1.2]1

[29.1.3]k[n]

Errorcorrectionproblem:[29.2.1]floatfun(intk)

[29.2.2]returns;

Programming:DoubleFun(intn)

(

Inti;

Doubles=0;

For(i=l;i<=n;i++)

(

S+=l.0/(i*(i+1));

Returns;

30fillintheblanks:sortthedictionaryaccordingtothe

name.

Error:StringcontentforEgabcdfgh

Programming:putting69inheigh.Thirtiethsetsofcloze

questions:[30.1.1]structstudent

[30.1.2]n-1

[30.1.3]a[i].name,a[j].name

Errorcorrectionproblem:[30.2.1]q=p+i;

[30.2.2]while(q>p)

Programming:intfun(STREC*a,STREC*b,Int1,inth)

(

Inti,j;

For(i=0,j=0;i<N;i++)

(

If(a[i].s>=l&&a[i].s<=h)

J++;

}

)

Returnj;

)

31,fillintheblanks:databits:4,2,6,8,thereturnvalue

is4.

Error:whentoaccessn3,functionvalueis14.

Programming:****A*BC*G******

Thirty-firstsetsofclozequestions:[31.1.1]a[i]%2

[31.1.2]a[j]

[31.1.3]J

Errorcorrectionproblem:[31.2.1]fun(intn)

[31.2.2]if(n==l)

Programming:voidfun(char*a,intn)

Inti=0,j=0;

While(a[i])

(

If(a[i]=='*')j++;

Elsej=0;

I++;

)

If(j>n)

(

A[i-j+n]='\0';

}

)

32.Fillintheblanks:thenewnumberis739.

Error:output:120.000000.

Programming:thenthefunctionconvertsittointegervalue

1234.

Thirty-secondsetsofclozequestions:[32.1.1]10

[32.1.2]0

[32.1.3]x

Errorcorrectionproblem:[32.2.1]if(n==0)

[32.2.2]result=n一;

Programming:

Longfun(char*p)

(

Thefollowingcodeforreference*//*

Inti,lenlen;/**/stringlength

Longx=0;

Len=strlen(P);

Followingthecompletionofdigital/*stringisconvertedto

adigital.Note:thecharacter'O'isnotthenumber0.

For(i=0;i<len;i++)x=x*10+p[i],O';

Returnx;

33,programfillintheblanks:SSreferstothestringarray

inwhichthereareNstrings,andthestringlengthislessthan

M.

Error:stringinCshouldbe:aBcdeFgH.

Programming:****A*BC*G******,afterdeleting,

Thecontentinthestringshouldbe:****ABCDEFG

Thirty-thirdsetsofclozequestions:[33.1.1]N

[33.1.2]K

[33.1.3]ss[i]

Errorcorrectionproblem:[33.2.1]intk=0;

[33.2.2]while(*p||*q)

Programming:voidfun(char*a)

(

Thefollowingcodeforreference*//*

Inti=0,k;

While(a[i]=='*')i++;

K=i;

While(a[i]!='\0')thefollowingprogram*/**/noncharacter

forward

(

If(a[i]='*'!)

(

A[k]=a[i];

K++;

)

I++;

}

A[k]=\0);

)

34.Fillintheblanks:thereturnvalueofthefunctionis6.

Errorcorrection:islowerthantheaveragenumberofstudents

dividedasfollows:4.

Programming:theoutputresultsareasfollows:6980.

[34.1.1]n++

[34.1.2]0

[34.1.3]s++

Errorcorrectionproblem:[34.2.1]t+=s[k];

[34.2.2]*aver=ave;

Programming:voidfun(int*s,intt,int*k)

(

Inti;

*k=0;

For(i=0;i<t;i++)

If(s[i]>s[*k])*k=i;

)

35,fillintheblanks:String:asdfghdf123543

Error:thearrayreferredtointheWcontentofabcdabf99c.

Programming:thecontentshouldbe:"BDF24”

35setsofclozequestions:[35.1.1]s[i]

[35.1.2]K

[35.1.3]0

Errorcorrectionproblem:[35.2.1]while(*w)

[35.2.2]if(*r==*p)

Programming:voidfun(char*s,chart[])

(

Inti=0,j=0;

While(s[i])

(

If(s[i]%2==0)

(

T[j]=s[i];

J++;

I++;

}

T[j]=O;

}

36fillintheblanks:ifnotfound,returnto-1.ss.....The

stringlengthislessthanM.

Canputinthetendigita2.

Programming:****A*BC*G******,afterdeleting,thecontentof

thestringshouldbe:****A*BC*DEF*G******

Thirty-sixthsetsofclozequestions:[36.1.1]N

[36.1.2]I

[36.1.3]-1

Errorcorrectionproblem:[36.2.1]a2=k/10;

[36.2.2]returni;

Programming:ivoidfun(char*a)

Inti=0,j=0;

While(a[i])

(

If(a[i]j=0='*'!);

Elsej++;

I++;

)

A[i-j]=O;

)

37,fillintheblanks:LEVLEVisnotapalindrome”.Canbe

output:8.391667.

Programming:outputshouldbe:19,23,29,31,37.

Thirty-seventhsetsofclozequestions:[37.1.1]s

[37.1.2]-

[37.1.3]return0

Errorcorrectionproblem:[37.2.1]doublefun(intn)

[37.2.2]c=a;a+=b:b=c;

Programming:voidfun(intm,intk,intxx[])

(

Thefollowingcodeforreference*//*

Intj=0,t=m+l;

While(j<k)

(

Thefollowingcode*//*accordingtothetopicrequest

If(prime(T))

(

Xx[j]=t;

J++;

)

T++;

}

38.programfillintheblanks:thereturnvalueofthefunction

is:0.551690

Canbeoutput:8.391667.

Programming:findthevalueofthelargestelementina2*M

shaping2Darray

Thirty-eighthsetsofclozequestions:[38.1.1]3.

[38.1.2]>

[38.1.3](2*i+l)

Errorcorrectionproblem:[38.2.1]doublefun(intn)

[38.2.2]s=s+(double)a/b;

Programming:intfun(inta[][M])

(

Inti,s=a[0][0];

For(i=0;i<M;i++)

If(a[0][i]>s)s=a[0][i];

If(a[l][i]>s)s=a[l][i];

Returns;

)

39,fillintheblanks:1,2,3,4,5,6,7,8,9,followedby

9,8,7,6,5,4,3,2,1,respectively

Error:output:327676.

Programming:givethescore-1,

Returnasafunctionvalue.

Thirty-ninthsetsofclozequestions:[39.1.1]n/2

[39.1.2]I

[39.1.3]a[n-i-l]

Errorcorrectionproblem:[39.2.1]n=*p-'O';

[39.2.2]n=n*8+*p-'O';

Programming:STRECfun(STREC*a,char*b)

Inti;

STRECt={'\0',-1};

For(i=0;1<N;i++)

(

If(StrCmp(a[i].num,b)==0)t=a[i];

}

Returnt;

}

40.Fillintheblanks:theresultsareasfollows:10001

Error:fromstothestringtodeletealllowercaselettersC.

Programming:*******A*BC*G****,aftermoving,thestring

contentshouldbe:A*BC*DEF*G**********

Fortiethsetsofclozequestions:[40.1.11a

[40.1.2]

[40.1.3]score[i]

Errorcorrectionproblem:[40.2.1]s[j++]=s[i];

[40.2.2]s[j]=0;

Programming:voidfun(char*a)

(

Thefollowingcodeforreference*//*

Char*p,*q;

Intn=0;

P=a;

While(*p=='*')statisticsonthenumberofhead/***n

{n++;p++;}

Q=a;

Forward/*copythestringpleasefillinthecorresponding

statementtocompleteitsfunction.

While(*p)*q++=*p++;

(for;n>0;n-)attheendofthestringupn/***/

*q++='*,;

*q='\0';

41.Fillintheblanks:thenumberofprimesisreturnedasa

functionvalue.

Error:thecumulativevalueshouldbe421263665701010.

Programming:s=0.662872

Forty-firstsetsofclozequestions:[41.1.1]j=2

[41.1.2]I

[41.1.3]J

Errorcorrectionproblem:[41.2.1]sum=0;j=0;

[41.2.2]if(sum%4==2)

Programming:

Doublefun(intn)

(

Inti;

Doublesum=0.0;

For(i=l;I<n;i++)

Sum=sum+1.0/(2*i-l)-1.0/(2*i);

Returnsum;

}

42.Fillintheblanks:thereturnvalueofthefunctionis:

26846.

Error:thentheballtwodiagonalelementsonly,andreturns

thisnumber.

Forexample,a=45,b=12.callsthisfunction,c=4251

Forty-secondsetsofclozequestions:[42.1.1]1

[42.1.2]s

[42.1.3]i*10

Errorcorrectionproblem:[42.2.1]intfun(intn,intxx[][M])

[42.2.2]printf("%d〃,xx[i][j]);

Programming:voidfun(inta,intb,long*c)

*c=a/10*1000+a%10*10+b/10+b%10*100;

43,programfillintheblanks:datashouldbe:10002,"LiSi",

96,81,89.

Error:nisstoredinthenumberofelementsinthearray.

Programming:whena=45,b=12,callthisfunction,c=1524.

Forty-thirdsetsofclozequestions:[43.1.1]structstudent

[43.1.2]

[43.1.3]a.score[i]

Errorcorrectionproblem:[43.2.1]if(p==n)return-1;

[43.2.2]a[i]=a[i+l];

Programming:voidfun(inta,intb,long*c)

(

*c=b/10*1000+a%10*100+b%10*10+a/10;

)

Fillintheblankswith44..Program

After246810inversion,thedatadomainfromendtoendis:

108642

Forty-fourthsetsofblankquestions:after6,7,8,9,5,1,

2,3,4.

Error:theoutputshouldbe:a55.0,b=34.0,c=12.0

Programming:returnsthenumberofstudentswiththehighest

scores.

Fillintheblanks:[44.1.1]1

[44.1.2]I

[44.1.3]a[p+i]

Error

温馨提示

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

评论

0/150

提交评论