上机题库100套答案文档格式.docx
- 文档编号:21259008
- 上传时间:2023-01-28
- 格式:DOCX
- 页数:46
- 大小:23.20KB
上机题库100套答案文档格式.docx
《上机题库100套答案文档格式.docx》由会员分享,可在线阅读,更多相关《上机题库100套答案文档格式.docx(46页珍藏版)》请在冰豆网上搜索。
38.
(1)0
(2)x(3)t++
39.
(1)0
(2)||(3)1
40.
(1)k
(2)N-1(3)temp
41.
(1)N
(2)break(3)n
42.
(1)p->
next
(2)q(3)p->
next
43.
(1)h->
next
(2)p==0(3)r
44.
(1)0
(2)10*x(3)n/10
45.
(1)N
(2)substr(3)0
46.
(1)1
(2)s(3)i*10
47.
(1)"
rb"
(2)>
s[j].sno(3)fwrite
48.
(1)*s
(2)1(3)k[n]
49.
(1)*s
(2)s++(3)n
50.
(1)NODE*
(2)q(3)r
51.
(1)->
52.
(1)0
(2)i++(3)2.*i
53.
(1)j++
(2)s[i]=t1[i](3)j
54.
(1)[N]
(2)t[i][j](3)t[j][i]
55.
(1)t=i
(2)i(3)0
56.
(1)next
(2)t->
data(3)t
57.
(1)sum=0
(2)t[i][i](3)1
58.
(1)999
(2)t/10(3)x
59.
(1)10
(2)0(3)x
60.
(1)0
(2)10*x(3)n/10
61.
(1)1
(2)j++(3)j
62.
(1)M
(2)<
(3)k
63.
(1)*fw
(2)str(3)str
64.
(1)1
(2)i(3)a[p+i]
65.
(1)N
(2)k(3)ss[i]
66.
(1)3.
(2)>
67.
(1)s[i]
(2)'
9'
(3)*t=n
68.
(1)a[i]
(2)a[j](3)a[j]
69.
(1)0
(2)x(3)t++
70.
(1)i++
(2)m(3)m
71.
(1)a[i]%2
(2)a[j](3)j
72.
(1)s[i]
(2)k(3)0
73.
(1)0
(2)n(3)(t*t)
74.
(1)1
(2)s[k](3)c
75.
(1)*n
(2)next(3)head
76.
(1)N
(2)N-1(3)0
77.
(1)N
(2)i(3)-1
78.
(1)structstudent*
(2)a->
79.
(1)q
(2)next(3)next
80.
(1)(fp)
(2)==(3)fp
81.
(1)&
&
(2)0(3)s[j]
82.
(1)structstudent
(2)a.name(3)a.score[i]
83.
(1)1
(2)2*i(3)(-1)
84.
(1)char
(2)ch<
='
(3)'
85.
(1)data
(2)next(3)head
86.
(1)0
(2)n(3)head,ch
87.
(1)x
(2)p(3)s
88.
(1)STYPE
(2)FILE(3)fp
89.
(1)0
(2)j--(3)j
90.
(1)t[][N]
(2)i=0;
i<
n(3)s
91.
(1)0
(2)0(3)c
92.
(1)a
(2)b.name(3)score[i]
93.
(1)[M]
(2)N(3)0
94.
(1)"
r"
(2)fs(3)ft
95.
(1)1
(2)s(3)i*10
96.
(1)fp
(2)fclose(fp)(3)fname
97.
(1)structstudent
(2)n-1(3)a[i].name,a[j].name
98.
(1)n/2
(2)i(3)a[n-i-1]
99.
(1)*a
(2)2(3)i+1
100.
(1)N
(2)substr(3)0
二、改错题
1.
(1)char*fun(char*s,char*t)
(2)ss++;
(3)tt++;
2.
(1)q=p+i;
(2)while(q>
p)
3.
(1)doublefun(intm)
(2)for(i=100;
=m;
i~1+=0)
4.
(1)for(i=strlen(t)-1;
i;
i--)
(2)if(t[j]>
t[j+1])
5.
(1)voidfun(char*s,int*a,int*b)
(2)++(*a);
(3)++(*b);
6.
(1)for(i=0;
str[i];
i++)
(2)if(substr[k+1]==0)
7.
(1)for(i=2;
i++)
(2)y-=1.0/i/i;
8.
(1)intk=0;
(2)while(*p||*q)
9.
(1)s[j++]=s[i];
(2)s[j]=0;
10.
(1)t=1;
(2)return(2*s);
11.
(1)if(i%k==0)
(2)if(k>
=i)
12.
(1)while(i<
j)
(2)if(*a)
13.
(1)voidfun(longs,long*t)
(2)while(s>
0)
14.
(1)if((k%13==0)||(k%17==0))
(2)}
15.
(1)p=h->
next;
(2)p=p->
16.
(1)char*fun(char(*sq)[M])
(2)returnsp;
17.
(1)#include"
stdio.h"
(2)upfst(char*p)
18.
(1)t+=s[k];
(2)*aver=ave;
19.
(1)a2=k/10;
(2)returni;
20.
(1)intfun(int*x,int*y)
(2)t=*x;
*x=*y;
*y=t;
21.
(1)doublefun(intn)
(2)c=a;
a+=b;
b=c;
22.
(1)n=strlen(aa);
(2)ch=aa[i];
23.
(1)doublefun(doublea,doublex0)
(2)if(fabs(x1-x0)>
0.00001)
24.
(1)num[k]=0;
(2)switch(*s)
25.
(1)voidfun(char*s,char*t)
(2)t[2*d]=0;
26.
(1)aa[i]=m%k;
(2)printf("
%d"
aa[i-1]);
27.
(1)p=h->
28.
(1)t=(STU*)calloc(sizeof(STU),m);
(2)t[k]=b[j];
29.
(1)k++;
(2)if(m==k)
30.
(1)p=(NODE*)malloc(sizeof(NODE));
(2)returnh;
31.
(1)floatfun(intn)
(2)for(i=2;
i<
=n;
i++)
32.
(1)s[j++]=s[i];
33.
(1)if(p==n)return-1;
(2)a[i]=a[i+1];
34.
(1)doublefun(intn)
(2)returnsum;
35.
(1)while(*w)
(2)if(*r==*p)
36.
(1)doublefun(intn)
(2)s=s+(double)a/b;
37.
(1)if(n==0)
(2)result*=n--;
38.
(1)inti,sl;
(2)t[i]=s[sl-i-1];
39.
(1)t-=1.0/i;
(2)returnt;
40.
(1)fun(inta[][M],intm)
(2)a[j][k]=(k+1)*(j+1);
41.
(1)sum=0;
(2)scanf("
&
a[i][j]);
42.
(1)while(*s)
(2)s++;
43.
(1)r=t;
(2)if(*r==0)
44.
(1)*t=0;
(2)if(d%2!
=0)
45.
(1)fun(intx,inty,intz)
(2)returnj;
46.
(1)intfun(intn,intxx[][M])
(2)printf("
xx[i][j]);
47.
(1)p=s;
(2)while(*p++);
48.
(1)floatfun(intk)
(2)returns;
49.
(1)intj,c=0;
floatxa=0.;
(2)if(x[j]>
=xa)
50.
(1)if(i%2||s[i]%2==0)
(2)t[j]=0;
51.
(1)doublefun(doublea,doublex0)
52.
(1)voidfun(char*s,char*t)
(2)t[2*d]=0;
53.
(1)for(j=i+1;
j<
6;
j++)
(2)*(pstr+i)=*(pstr+j);
54.
(1)#defineFU(m,n)((m)/(n))
(2)return(value);
55.
(1)while((fabs(t))>
=num)
(2)t=s/n;
56.
(1)fun(char*a)
(2)printf("
%c"
*a);
57.
(1)doubler;
(2)while(fabs(m-n)>
0.001)
58.
(1)voidfun(longs,long*t)
(2)while(s>
59.
(1)if(n==0)
(2)result*=n--;
60.
(1)*t=0;
61.
(1)t=a;
a=b;
b=t;
(2)return(b);
62.
(1)if(('
a'
<
=tt[i])&
(tt[i]<
z'
))
(2)tt[i]-=32;
63.
(1)voidfun(longs,long*t)
(2)sl=sl*10;
64.
(1)floatk;
(2)if(*c>
*a)
65.
(1)intk=0;
66.
(1)doublefun(intn)
(2)s=s+(double)a/b;
67.
(1)t=*x;
*x=y;
68.
(1)switch(g)
(2)case1:
return1;
case2:
return1;
69.
(1)inti,sl;
70.
(1)while((2<
=high)&
(n<
10))
(2)yes=0;
break;
71.
(1)fun(intn)
(2)if(n==1)
72.
(1)while(*w)
(2)if(*r==*p)
73.
(1)for(i=0;
74.
(1)longs=0,t=0;
(2)t=t/10;
75.
(1)a=0;
(2)if(*r==*p)
76.
(1)s=s+(n+1.)/n;
77.
(1)a2=k/10;
78.
(1)char*fun(char(*sq)[M])
(2)returnsp;
79.
(1)p=j;
(2)p=i;
80.
(1)n=strlen(aa);
81.
(1)for(i=2;
i++)
(2)y+=1.0/i/i;
82.
(1)if(p==n)return-1;
83.
(1)k++;
84.
(1)b[k]=*p;
(2)b[k]='
'
;
k++;
85.
(1)while(*r)
(2)*a=*r;
a++;
r++;
86.
(1)for(i=0,t=0;
p[i];
i++)
(2)c[t]=0;
87.
(1)longk=1;
(2)num/=10;
88.
(1)for(i=0;
i<
sl;
i++)
(2)t[2*sl]=0;
89.
(1)doublef(doublex)
(2)returns;
90.
(1)fun(inta[],intm)
(2)elseif(m>
a[mid])
91.
(1)doublesum=0.;
(2)sum/=c;
92.
(1)s[j++]=s[i];
93.
(1)t=1;
94.
(1)if(d%2==0)
(2)s/=10;
95.(1n,intxx[][M])
(2)printf("
96.
(1)for(i=j+1;
n;
i++)
(2)p=i;
97.
(1)q=p+i;
98.
(1)n=*p-'
(2)n=n*8+*p-'
99.
(1)sum=0;
(2)if((i+1)%5==0)
100.
(1)fun(intx,inty,intz)
(2)returnj;
三、编程题
1.voidfun(char*w,intm)
{
chara[N];
inti;
for(i=0;
m;
i++)a[i]=w[i];
while(w[i]){w[i-m]=w[i];
i++;
}
i--;
m--;
for(;
m>
=0;
m--,i--)w[i]=a[m];
2.intfun(STREC*a,STREC*b,intl,inth)
inti,j=0;
N;
i++)
if(a[i].s>
=l&
a[i].s<
=h)
b[j]=a[i];
j++;
returnj;
3.fun(STUa[],STU*s)
*s=a[0];
for(i=1;
if(a[i].s<
s->
s)
*s=a[i];
4.voidfun(char*ss)
inti=1;
while(ss[i-1]&
ss[i])
if(ss[i]>
&
ss[i]<
)ss[i]+='
A'
-'
i+=2;
5.floatfun(floath)
longi=h*1000;
if(i%10<
5)return(i/10)/100.0;
elsereturn(i/10+1)/100.0;
6.doublefun(doubleeps)
doublei=1,a=1,b=1,c=1,s=0;
while(c>
=eps)
s+=c;
a*=i;
b*=2*i+1;
c=a/b;
i++;
returns*2;
7.intfun(intscore[],intm,intbelow[])
inti,j=0,s=0;
i++)s+=score[i];
s/=m;
if(score[i]<
below[j]=score[i];
8.voidfun(char*a)
inti=0,j=0;
while(a[i])
if(j==0&
a[i]!
*'
)
j=i+1;
elseif(a[i]!
a[j]=a[i];
a[j]=0;
9.voidfun(char*a)
if(a[i]!
j=i;
break;
a[i-j]=a[i];
i-=j;
j>
0;
j--)
a[i]='
10.voidfun(char*a,intn)
if(j>
n)
a[i-j+n]=a[i];
a[i-j+n]=0;
11.voidfun(intx,intpp[],int*n)
*n=0;
=x;
i+=2)
if(x%i==0)
pp[*n]=i;
(*n)++;
12.voidfun(char*s,chart[])
while(s[i])
if(i%2!
=0||s[i]%2==0)
t[j]=s[i];
t[j]=0;
13.voidfun(inta,intb,long*c)
*c=a/10*100+a%10+b/10*10+b%10*1000;
14.doublefun(intn)
doubles=0;
if(i%3==0&
i%7==0)s+=i;
returnsqrt(s);
15.voidfun(int(*s)[10],int*b,int*n,intmm,intnn)
inti,j;
mm;
for(j=0;
nn;
j++)
b[*n]=s[i][j];
16.intfun(STRECa[])
STRECb;
N-1;
for(j=i+1;
a[j].s)
{b=a[i];
a[i]=a[j];
a[j]=b;
17.doublefun(intw[][N])
s+=w[0][i]+w[N-1][i]+w[i][0]+w[i][N-1];
s-=w[0][0]+w[0][N-1]+w[N-1][0]+w[N-1][N-1];
returns/(N*4-4);
18.intfun(int*s,intt,int*k)
*k=0;
t;
if(s[i]>
s[*k])*k=i;
19.voidfun(char*a)
)j=0;
elsej++;
a[i-j]=0;
20.intfun(intlim,intaa[MAX])
inti,j,k=0;
for(i=2;
=lim;
for(j=2;
i;
if(i%j==0)break;
if(j==i)
aa[k]=i;
returnk;
21.voidfun(intm,intk,intxx[])
inti,j=m+1,n=0;
while(n<
k)
j;
if(j%i==0)break;
xx[n]=i;
n++;
22.doublefun(STREC*h)
doublea=0;
STREC*p=h->
while(p)
if(a<
p->
s)a=p->
s;
p=p->
returna;
23.doublefun(STREC*a,STREC*b,int*n)
s+=a[i].s;
s/=N;
b[*n]=a[i];
returns;
24.intfun(inta[M][N])
inti,s=0;
s+=a[0][i]+a[M-1][i];
M-1;
s+=a[i][0]+a[i][N-1];
25.voidfun(char*s,chart[])
if(i%2==1&
s[i]%2==1)
26.fun(char(*a)[81],intnum,char**max)
inti,j,k=strlen(a[0]);
*max=a[0];
num;
j=strlen(a[i]);
if(k<
j)
k=j;
*max=a[i];
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 上机 题库 100 答案
![提示](https://static.bdocx.com/images/bang_tan.gif)