3计算机国二题库缩减版.docx

上传人:b****3 文档编号:4940275 上传时间:2022-12-11 格式:DOCX 页数:25 大小:19.92KB
下载 相关 举报
3计算机国二题库缩减版.docx_第1页
第1页 / 共25页
3计算机国二题库缩减版.docx_第2页
第2页 / 共25页
3计算机国二题库缩减版.docx_第3页
第3页 / 共25页
3计算机国二题库缩减版.docx_第4页
第4页 / 共25页
3计算机国二题库缩减版.docx_第5页
第5页 / 共25页
点击查看更多>>
下载资源
资源描述

3计算机国二题库缩减版.docx

《3计算机国二题库缩减版.docx》由会员分享,可在线阅读,更多相关《3计算机国二题库缩减版.docx(25页珍藏版)》请在冰豆网上搜索。

3计算机国二题库缩减版.docx

3计算机国二题库缩减版

本机试题库由翼知真诚奉献

说明:

主要找你的填空题第一道题的题干,然后后面的答案都是相对应一套一套的,如:

加入你的填空题第一道题的题干和这里的第1套是一样的(有些提干是一模一样的,如第1和25,33、36和39,27和49,请继续看第二个found),那你所有题的答案都是相对应的第1套。

其他类推。

一、填空题

1/*********found*******/

t=___1___;(同25一样)

/**********found**********/

t*=(-1.0)*x/___2___;

(1)x

(2)n(3)fabs(t)

2/**********found**********/

switch(___1___)

(1)n%10

(2)break(3)break

3/**********found**********/

if(t%2==__1__)

(1)0

(2)10*x(3)n/10

4/**********found**********/

rmax=a[i][j];c=__1__;}

(1)j

(2)0(3)i++

5/**********found**********/

voidfun(char(*ss)__1__,intk)

(1)[M]

(2)N(3)0

6/**********found**********/

voidfun(int(*t)___1___)

(1)[N]

(2)t[i][j](3)t[j][i]

7/**********found**********/

voidfun(int(*a)[N],int__1__)

(1)k

(2)N(3)a[k][i]

8/**********found**********/

while(t<=__1__){

(1)999

(2)t/10(3)x

9/**********found**********/

___1___;

(1)sum=0

(2)t[i][i](3)1

10/*********found**********/

___1___fun(charch)

(1)char

(2)ch<='9'(3)'0'

11/*********found**********/

s=0;i=__1__;

(1)0

(2)i++(3)2.*i

12/*********found**********/

while(!

feof(__1__))

(1)(fp)

(2)==(3)fp

13/*********found**********/

for(i=0;i<__1__;i++)

(1)N

(2)substr(3)0

14/*********found**********/

for(p=1;p<=__1__;p++)

(1)k

(2)N-1(3)temp

15/*********found**********/

t=(a>b)?

(b>c?

b:

(a>c?

c:

___1___)):

((a>c)?

___2___:

((b>c)?

c:

___3___));

(1)a

(2)a(3)b

16/*********found**********/

if((ch>='a')___1___(ch<='z'))

(1)&&

(2)'A'(3)ch

17/*********found**********/

if(isdigit(*s))sum+=*s-__1__;

(1)48

(2)s++(3)sum

18/*********found**********/

f=___1___;

(1)1

(2)-1(3)t

19/*********found**********/

if(n>=len)strcpy(__1__);

(1)t,s

(2)s[i](3)0

20/*********found**********/

__1__fun(structstudent*a)

(1)structstudent*

(2)a->score[i](3)a

21/*********found**********/

max=min=___1___;

(1)a[i]

(2)a[j](3)a[j]

22/*********found**********/

voidfun(int___1___,intn)

(1)t[][N]

(2)i=0;i

23/*********found**********/

voidfun(int___1___,intn)

(1)*a

(2)2(3)i+1

24/*********found**********/

f=1.0+___1___;

(1)x

(2)n(3)t

25/*********found**********/

t=___1___;(同第1题一样)

/**********found**********/

for(i=___2___;i

(1)1

(2)1(3)i

26/*********found**********/

b__1__=10004;

(1)->sno

(2)->name(3)&t

27/*********found**********/

k=__1__;(同第49题一样)

/*********found**********/

t=__2__;

(1)1

(2)2*i(3)(-1)

28/*********found**********/

s=__1__;

(1)0

(2)n(3)(t*t)

29/*********found**********/

ch=tolower(__1__);

(1)*s

(2)1(3)k[n]

30/*********found**********/

__1__t;

(1)structstudent

(2)n-1

(3)a[i].name,a[j].name

31/*********found**********/

if(___1___==0){

(1)a[i]%2

(2)a[j](3)j

32/*********found**********/

{t=*n%__1__;

(1)10

(2)0(3)x

33/*********found**********/

for(i=0;i<__1__;i++)(同第36和第39一样)

/**********found**********/

if(len<=__2__)

(1)N

(2)k(3)ss[i]

34/*********found**********/

__1__;flag=1;}

(1)n++

(2)0(3)s++

35/*********found**********/

t[j]=__1__;j++;}

(1)s[i]

(2)k(3)0

36/*********found**********/

for(i=0;i<__1__;i++)

/**********found**********/

if(strcmp(ss[i],t)==0)

return__2__;(同第33和第39一样)

(1)N

(2)i(3)-1

37/*********found**********/

lp=__1__;

(1)s

(2)--(3)return0

38/*********found**********/

x=__1__/4;

(1)3.

(2)>(3)(2*i+1)

39/*********found**********/

for(i=0;i<___1___;i++)

/**********found**********/

a[i]=a[n-1-___2___];(同第33和第36一样)

(1)n/2

(2)i(3)a[n-i-1]

40/*********found**********/

b=__1__;

(1)a

(2)b.name(3)score[i]

41/*********found**********/

for(___1___;j

(1)j=2

(2)i(3)j

42/*********found**********/

i=__1__;

(1)1

(2)s(3)i*10

43/*********found**********/

__1__fun(structstudenta)

(1)structstudent

(2)a.name

(3)a.score[i]

44/*********found**********/

p=(n%2==0)?

n/2:

n/2+___1___;

(1)1

(2)i(3)a[p+i]

45/*********found**********/

if(a[i]%2==___1___)

(1)1

(2)j++(3)j

46/*********found**********/

n=__1__;

(1)0

(2)x(3)t++

47/*********found**********/

*(t+n)=__1__;n++;}

(1)*s

(2)s++(3)n

48/*********found**********/

#defineOK(i,t,n)

((___1___%t==0)&&(i/t

(1)i

(2)t++(3)count

49/*********found**********/

k=__1__;(同第27题一样)

/**********found**********/

if(strlen(ps[k])

(1)i

(2)ps[j](3)tp

50/*********found**********/

for(j=a[i]*2;j<=n;j+=___1___)

(1)a[i]

(2)a[i](3)0

二、改错题

A1

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

(2)t=t%1000;

A2

(1)if(t==0)

(2)*zero=count;

A3

(1)*t=0;

(2)if(d%2!

=0)

A4

(1)for(i=2;i<=m;i++)

(2)y-=1.0/i/i;

A5

(1)t=1;

(2)return(2*s);

A6

(1)#defineFU(m,n)((m)/(n))

(2)return(value);(注:

R,V小写)

A7

(1)for(i=strlen(t)-1;i;i--)

(2)if(t[j]>t[j+1])

A8

(1)voidfun(longs,long*t)

(2)while(s>0)

A9

(1)doubler;

(2)while(fabs(m-n)>0.001)(注:

n,m,<)

A10

(1)b[k]=*p;

(2)b[k]='';k++;(注:

单引号)

A11

(1)voidfun(char*s,char*t)

(2)t[2*d]=0;

A12

(1)n=strlen(aa);

(2)ch=aa[i];

A13

(1)fun(intx,inty,intz)

(2)returnj;

A14

(1)voidfun(inta[][M],intm)

A

(2)a[j][k]=(k+1)*(j+1);

A15

(1)c=tolower(c)(注:

c小写);

(2)c=c+5;

A16

(1)voidfun(int*a)

(2)a[j]=a[j-1];

A17

(1)if((k%13==0)||(k%17==0))(注:

双等号)

(2)}(注:

横线去掉)

A18

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

(2)if(k>=0&&k<=6)

A19

(1)if(i%k==0)

(2)if(k>=i)

A20

(1)char*fun(char(*sq)[M])

(2)returnsp;

A21

(1)switch(g)

(2)case1:

return1;case2:

return1;

A22

(1)fun(inta[],intm)

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

A23

(1)sum=0;

(2)if((i+1)%5==0)

A24

(1)d=1;s=0;

(2)d=d/10;

A25

(1)k=i;

(2)c=k;

A26

(1)doublefun(doublea,doublex0)

(2)if(fabs(x1-x0)>0.00001)

A27

(1)k++;

(2)if(m==k)

A28

(1)for(i=0;str[i];i++)

(2)if(substr[k+1]==0)

A29

(1)floatfun(intk)

(2)returns;

A30

(1)q=p+i;

(2)while(q>p)

A31

(1)fun(intn)

(2)if(n==1)

A32

(1)if(n==0)

(2)result*=n--;

A33

(1)intk=0;

(2)while(*p||*q)

A34

(1)t+=s[k];

(2)*aver=ave;

A35

(1)while(*w)

(2)if(*r==*p)

A36

(1)a2=k/10;

(2)returni;

A37

(1)doublefun(intn)

(2)c=a;a+=b;b=c;

A38

(1)doublefun(intn)

(2)s=s+(double)a/b;

A39

(1)n=*p-'0';

(2)n=n*8+*p-'0';

A40

(1)s[j++]=s[i];

(2)s[j]=0;

A41

(1)sum=0;j=0;

(2)if(sum%4==2)

A42

(1)intfun(intn,intxx[][M])

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

A43

(1)if(p==n)return-1;

(2)a[i]=a[i+1];

A44

(1)floatk;

(2)if(*c>*a)

A45

(1)t=a;a=b;b=t;

(2)return(b);

A46

(1)inti,sl;

(2)t[i]=s[sl-i-1];

A47

(1)intj,c=0;doublexa=0.;

(2)if(x[j]>=xa)

A48

(1)intfun(inta,intb,intc)

(2)elsereturn1;

A49

(1)doublefun(intn)

(2)returnsum;

A50

(1)y=1;

(2)d=a-i;

三、编程题

1、doublefun(doublex)

{inti=0;

doubles=1,a=1;

while(fabs(a)>0.000001)

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

s+=a;

i++;

}

returns;

}

2、doublefun(intn)

{inti;

doubles=0,a=1;

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

{a=a/i;

s+=a;

}

returns;

}

3、voidfun(charp1[],charp2[])

{while(*p1)p1++;

while(*p2)

{*p1=*p2;

p1++;

p2++;

}

*p1=0;

}

4、intfun(intscore[],intm,intbelow[])

{inti=0,s=0,n=0;

for(i=0;i

s/=m;

for(i=0;i

{if(score[i]

{below[n]=score[i];

n++;

}

}

returnn;

}

5、voidfun(char*a,intn)

{

/*以下代码仅供参考*/

inti=0,j,k=0;

while(a[k]=='*')k++;/*k为统计*字符个数*/

if(k>n)

{i=n;j=k;

/*以下完成将下标为k至串尾的字符前移k-n个位置*/

while(a[j])

{a[i]=a[j];

i++;

j++;

}

a[i]=0;

}

}

6、voidfun(char*a)

{inti=0,j=0;

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

while(a[i])

{a[j]=a[i];

i++;

j++;

}

a[j]=0;

}

7、voidfun(char*ss)

{inti=1;

while(ss[i-1]&&ss[i])

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

i+=2;

}

}

8、voidfun(STRECa[])

{STRECtmp;

inti,j;

for(i=0;i

for(j=i+1;j

{/*请按题目要求完成以下代码*/

if(a[i].s

{tmp=a[i];a[i]=a[j];a[j]=tmp;}

}

}

9、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、doublefun(STREC*h)

{inti=0;

doubles=0;

while(h->next)

{h=h->next;

s+=h->s;

i++;

}

s/=i;

returns;

}

11、voidfun(char*s,chart[])

{inti=0,j=0;

while(s[i])

{if(i%2==1&&s[i]%2==1)

{t[j]=s[i];

j++;

}

i++;

}

t[j]=0;

}

12、doublefun(STREC*h)

{doubles=0;

while(h->next)

{h=h->next;

if(ss)s=h->s;

}

returns;

}

13、voidfun(char*a,intn,inth,inte)

{inti;

for(i=0;i

a[i]=0;

}

14、voidfun(inta,intb,long*c)

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

15、doublefun(intn)

{inti;

doubles=0,a=0;

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

{a+=sqrt(i);

s+=a;

}

returns;

}

16、intfun(intn)

{inti,s=0;

for(i=2;i

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

}

returns;

}

17、doublefun(intn)

{inti,s=0;

for(i=21;i

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

}

returnsqrt(s);

}

18、doublefun(intn)

{inti;

doubles=1,a=1;

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

{a=a/i;

s+=a;

}

returns;

}

19、voidfun(intx,intpp[],int*n)

{inti;

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

{if(x%i==0)

{pp[*n]=i;

(*n)++;

}

}

}

20、voidfun(inta,intb,long*c)

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

21、voidfun(STREC*a)

{inti;

doubles=0;

for(i=0;is[i];

a->ave=s/N;

}

22、voidfun(char*a,char*p)

{char*b=a;

while(b

{if(*b!

='*')

{*a=*b;

a++;

}

b++;

}

while(*p)

{*a=*p;

a++;

p++;

}

*a=0;

}

23、doublefun(STREC*a,STREC*b,int*n)

{inti;

doubles=0;

for(i=0;i

s/=N;

for(i=0,*n=0;i

{if(a[i].s

{b[*n]=a[i];

(*n)++;

}

}

returns;

}

24、doublefun(doublex[9])

{inti;

doubles=0;

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

returns;

}

25、doublefun(doublex[10])

{inti;

doubles=0,x1=0;

for(i=0;i<10;i++)x1+=x[i];

x1/=10;

for(i=0;i<10;i++)s+=(x[i]-x1)*(x[i]-x1);

s=sqrt(s/10);

returns;

}

26、doublefun(STREC*a,STREC*b,int*n)

{inti;

doubles=0;

for(i=0;i

s/=N;

for(i=0,*n=0;i

{if(a[i].s>=s)

{b[*n]=a[i];

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > IT计算机 > 计算机硬件及网络

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1