上师大c语言专升本a卷答案-2009年

上师大c语言专升本a卷答案-2009年

ID:16721357

大小:41.00 KB

页数:3页

时间:2018-08-24

上师大c语言专升本a卷答案-2009年_第1页
上师大c语言专升本a卷答案-2009年_第2页
上师大c语言专升本a卷答案-2009年_第3页
资源描述:

《上师大c语言专升本a卷答案-2009年》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库

1、二○○九年上海师范大学专升本招生考试《C语言程序设计》试卷答案一、单选题(每小题2分,共20分)题号12345678910答案CAABBDAACA二、填空题(每小题2分,共40分)(做对2分,做错0分)1#defineNUM311&a[i]2&m[i][j]12ja[j]4j

2、'19i<=n10#defineN1020returns三、写出程序的运行结果(每小题5分,共40分)(做对部分,给3分,全错0分)题号答案111112143221433214432136,5,8,4,10,7,9,1,3,2,413,11,9,7,52110034767745forthequalityofreviewsandreview.Article26threview(a)theCCRAcompliance,whethercopiesofchecks;(B)whetherdoubleinvestigation;(C)submissionofprogram

3、compliance,investigationorexaminationofwhetherviewsareclear;(D)theborrower,guarantorloans3a8809四、编程题(第1,2小题各15分,第3小题20分,共50分)评分标准:1、程序完整,给5分2、无语法错,给5分3、运行正确,给满分1、main(){longs,t,max=-1;printf("pleaseinputinteger:");scanf("%ld",&s);while(s!=0){t=s%10;if(max

4、n",max);}2、intindex(charc,char*str){char*p;intcount;count=0;p=str;while(*p!=’’){if(*p==c)break;p++;returncount;}3、#include"stdio.h"structstrnum{inti;charch;}main(){charc;inti=0,k=0;structstrnums[100]={0,NULL};while((c=getchar())!='')forthequalityofreviewsandreview.Article26threv

5、iew(a)theCCRAcompliance,whethercopiesofchecks;(B)whetherdoubleinvestigation;(C)submissionofprogramcompliance,investigationorexaminationofwhetherviewsareclear;(D)theborrower,guarantorloans3a{for(i=0;s[i].i!=0;i++){if(c==s[i].ch){s[i].i++;break;}}if(s[i].i==0){s[k].ch=c;s[k++].i=1;}}i

6、=0;while(s[i].i>0){printf("%c=%d",s[i].ch,s[i].i);i++;}}forthequalityofreviewsandreview.Article26threview(a)theCCRAcompliance,whethercopiesofchecks;(B)whetherdoubleinvestigation;(C)submissionofprogramcompliance,investigationorexaminationofwhetherviewsareclear;(D)theborrower,guaranto

7、rloans3a

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。