华师c语言程序设计作业,华师《C语言程序设计》练习题库答案

62e50291a81fc54b507f33cb80033297.gif 华师《C语言程序设计》练习题库答案

(10页)

93a842ada5038bd2d05b4aaa09799fb7.png

本资源提供全文预览,点击全文预览即可全文预览,如果喜欢文档就下载吧,查找使用更方便哦!

11.90 积分

《C语言程序设计》试题库答案一、选择题(下列各题有四个选项,只有一个答案是正确的,请选出正确选项)1--5 ACDCB 6--10 ACBAB 11--15CCADB 16--20BABCD 21--25CDACC 26--30 DDBDB 31--35DADAA 36—40BCBCC 41—45CDCCB 46--50 CBAAD 51--55 BCAAC 56--60 DBBCA61--65 CDCCD 66-70 CDDAC 71—75 CCDBC 76—80 DDBCA 81—85 CDDDB 86—90 BBBAB 二、填空题1、 【1】1 【2】22、 【1】4 【2】83、 -164、 -32768 ~ 327675、 【1】单精度型(或:float) 【2】双精度型(或:double)6、 【1】整型 【2】字符型 【3】枚举类型7、 18、 269、 【1】12 【2】410、 【1】6 【2】4 【3】211、 -6012、 213、 【1】10 【2】614、 5.50000015、 3.50000016、 i:dec=-4,oct=177774,hex=fffc,unsigned=6553217、 *3.140000,3.142*18、 c:dec=120,oct=170,hex=78,ASCII=x19、 *d(1)=-2*d(2)=-2*d(3)=-2**d(4)=177776*d(5)=177776*d(6)=177776*20、 *d(1)=-2*d(2)=-2*d(3)=-2**d(4)=fffe*d(5)=fffe*d(6)=fffe*21、 *d(1)=3.50000e+00*d(2)=3.500e+00*d(3)=3.500e+00**d(4)=-3.50000e+00*d(5)=-3.50000e+00*d(6)=-3.5000e+00*22、 x=1 y=2 *sum*=310 Squared is: 10023、 (1) 10(2) □□□□10 (□表示空格)(3) 56.100000(4) □□□□□□3.141600(5) 5.68100e+02(6) □□□3.14160e+00(7) 3.1416(8) □□□□□□3.141624、 (1) 123.456000(2) □□□□□□□123.457(3) 123.4560(4) 8765.456700(5) □□□□□□8765.457(6) 8765.4567(7) 8765.456725、 【1】可以使同一输出语句中的输出宽度得以改变。【2】 ##1 ##□2 ##□□3 ##□□□4 ##□□□□526、 sjhiu27、 s=25428、 5,529、 3630、 331、 * *32、 a=-533、i%3==2&&i%5==3&&i%7==2 【2】j%5==034、 【1】n%10 【2】max=t35、 sum%4==036、 【1】s%10 【2】s/1037、 k=14 n=-138、 x=1,y=2039、 1,3,7,15,31,63,40、 m=4 n=241、 i<=x-省略部分-} } for (i=0; i { for (j=0; j printf(“%5d”, a[i][j]); printf(“\n”); }} 10、 main(){ int a[10], b[10], i; for (i=0; i<10; i++) scanf(“%d”, &a[i]); for (i=1; i<10; i++) b[i] = a[i] / a[i-1]; for (i=1; i<10; i++) { printf(“%3d”, b[i]); if (i % 3 == 0) printf(“\n”); }}11、 #include main(){ char a[12] = “adfgikmnprs”, c; int i, top, bot, mid; printf(“Input a character\n”); scanf(“%c”, &c); printf(“c=\’%c\’\n”, c); for (top=0, bot=10; top a[mid]) top = mid + 1; else bot = mid – 1; } if (top > bot) printf(“* *\n”);}12、 #include #include main(){ char a[80], b[80]; int i = 0, j; printf(“Input two strings.\n”); gets(a); gets(b); while (a[i++] != ‘\0’) ; for (j=0, i--; j max) { max = a[i]; j = i; } i++; } for (i=strlen(a)+2; i>j; i--) a[i] = a[i-2]; a[i+1] = ‘a’; a[i+2] = ‘b’; puts(a);}14、 fun(int x, int y){ int z; z = fabs(x-y); return(z);}15、 isprime(int a){ int i; for (i=2; i if (a % i == 0) return 0; return 1;} 关 键 词: 练习 题库 C语言程序设计 答案

524d6daf746efaa52c3c71bbfe7ba172.gif  天天文库所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值