2011级c语言期中测试试题(大学城,中山校区ab组-参考答案) (1).txt_第1页
2011级c语言期中测试试题(大学城,中山校区ab组-参考答案) (1).txt_第2页
2011级c语言期中测试试题(大学城,中山校区ab组-参考答案) (1).txt_第3页
2011级c语言期中测试试题(大学城,中山校区ab组-参考答案) (1).txt_第4页
2011级c语言期中测试试题(大学城,中山校区ab组-参考答案) (1).txt_第5页
已阅读5页,还剩8页未读 继续免费阅读

下载本文档

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

文档简介

c a 飩 120 2 40 1c c a)c ,main 棬void b)c c)c ,i/o d)c , 2 d a)c b)c main c)c 壬 d)c ,档 3 c a)c c b)c .exe c)vc c .cpp.obj d)c c 4 b a) b) c)int d)return 5裬( d ) a) b) c) d) 6,( c ) a)$a p_0 do b)float la0 _a12 c)b+a 2bit int d)_123 temp! int 7, d a)0f1 0xffff 0011 b)0xcdf 017 12,456 c)018 999 5e2 d)0x48eh 068 03f 8,c 涨 a int i=8,k,a,b; unsigned long w=5; double x=1.42,y=5.2; a)a+=a-=(b=4)*(a=3) b)a=a*3=2 c)x%(-3) d)y=float(i) 9壺int a=7; float x=2.5,y=4.7;x+a%3*(int)(x+y)%2/4 a a)2.500000 b)2.750000 c)3.500000 d)0.000000 10壺float nint mn , b a)n=(n*100+0.5)/100.0 b)m=n*100+0.5,n=m/100.0 c)n=n*100+0.5/100.0 d)n=(n/100+0.5)*100.0 11|x3+lgx|c d a)fabs(x*3+log10(x) b)abs(pow(x,3)+log10(x) c)abs(pow(x,3.0)+log10(x) d)fabs(pow(x,3.0)+log10(x) 12a ,f ,c ,10+a+a*f d a)a*sizeof(100*f) b)a/=(int)(pow(f,3)/f)%10 c)c*=(f=2)+ f d)f=-(int)f/c%a*100 13xy z int x=(y=(z=10)+5)-5,+zy- -);xyz ( b ) a)x=10 y=15 z=10 b)x=15 y=14 z=11 c)x=14 y=14 z=10 d)x=10 y=15 z=11 14c 0 c ab c a)c=b=a b)(a=c)|(b=c) c)(a=c) (i=3,(j+)+i); j=i=(i=3)*2); cint i=0,j=1; dint i=1,j=1; (j=1)?i=1:i=3; i+=j+=2; 16scanf(“a=%d,b=%d,c=%d“,a 1b 3c 2 ( d ) a)132 b)1,3,2 c)a=1b=3c=2 d)a=1,b=3,c=2 17( d ) int a=10,b=66; printf(“a=%x,b=%c,a+b=%d%c“,a,b,a+b,a); printf(“*s=%-5.3s*“,“china“); a)a=a,b=b,a+b=76,10, *s=china* b) a=a,b= b,a+b=76, *s=chi* c) a=10,b= b,a+b=1066, d) a=a,b= b,a+b=76, *s=chi* *s=chi* 18( c ) | | | a b c a)(x=b) /4 long sum=0; /5 scanf(“%d “, /6 for(n=0;n sqrt(x) /12 sum+=x; /13 x+; /14 n+; /15 /16 printf(“nsum=%ldn“,sum); /17 /18 sum=20392 x,x 2 2828=1+2+4+7+142 x 100 #include /1 void main() /2 int x,n,k,s=0; /3 long sum=0; /4 scanf(“%d“, /5 for(n=0;n #include void main() float a,b,c,x1,x2,deta,sb,xb; printf(“input a,b,c:“); scanf(“%f,%f,%f“, if(fabs(a)0) /c!=0 printf(“not rootsn“); else printf(“x=0n“); else printf(“x=%fn“,c/b); else deta=b*b-4*a*c; /deta if(detamax1) max2=max1; max1=sc; else if(scmax2) max2=sc; printf(“second score =%f n“,max2); 塢21 32+1=321 100,100002 估 #include void main() int count=0,k,m; long s=0; for(k=100;k0) / s=s+m%10; m/=10; if(k%s=0) count+; printf(“count=%dn“,count); count=1506 塢120130 2 估 #include “stdio.h“ #include “math.h“ void main() int a,b,c,pb,count=0; c=120; while(c0) /n r=r*10+m%10; m=m/10; if(r=n) count+; s+=n; n+=3; printf(“sum=%dn“,s); sum=828393 abcd 1)a b 2)a d 3)b c 4b d #include “stdio.h“ void main() int k,a,b,c,d,maxp=0,p4=0,t1,t2,t3,t4; /maxp for(a=0;a0); /1 t2=(a+dmaxp) maxp=a+b+c+d; p0=a,p1=b,p2=c,p3=d; printf(“%d :“,maxp); for(k=0;k #include int is_samecon(int); void main() int n=6,count=0; while(count0) /x ws+; n=n/10; for(k=1;k #include int is_smith(int); int ws_sum(int); void main() int n,count=0; for(n=2;n1) /x if(n%k=0) /k x s2+=ws_sum(k); /k n=n/k; else k+; if(s1=s2) result=1; return result; int ws_sum(int x) /x int sum=0; while(x0) /x sum=sum+x%10; x=x/10; return sum; - wen 塣 ()- 棬- 飬- (1) “:; (2) figure;veins :textarticle塢“ 1 2. 3 4塣ab 5 6 7顫 8顱 9 10书 11552 12 13 14 15 16 纺 1 硣19917档 滭桢衢 裬磬岴岡 2 figure;veins 3磺İİ壨 4 character 顤 顤 5磺飩 6 literary composition 塤 7磺壨飨 8 virtue 9磺书 10. literary talent 顷 11磺壨 12 document;classics;verse 13 writings;record磺壨壨廪 14 natural phenomenon 15磺仯 16 achievements in culture and educationcivilian post 衷 dd 17磺 18 articles of decree 19磺飩棻棩 20 literary language磺İİ 21 rites 22磺()()()()() 23 form;appearance磺()İ()() 24 music;tune磺()() 25 study deligently 26 1 tatto (the skin) 伡 2磺

温馨提示

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

评论

0/150

提交评论