黄石理工学院2007年计算机科学与技术专业《C语言程序设计》专升本试卷(A) 参
考答案
一、单项选择题( 每小题2分,共30分)
1-5 BBBBC 6-10 CDAAA 11-15 CCBBD
二、填空题(每空2分,共20分)
1.函数
2.1
3.'\\0'
4.ch>=’A’&&ch<=’Z’
5.do-while
6.strcpy(s2,s1);
7. 指针(或地址)
8. 变量声明
9. int (*p)()
10. 在局部变量定义的函数或复合语句内
三、阅读程序,写出程序运行结果(每小题4分,共20分)
1.2 4 6 8 10
2.
####
###*
##**
#***
3. sum=6
4.ABCDEFG
CDEFG
EFG
G
5. 1, 2 ,3,
四、程序填空题(每空2分,共20分)
1. n1 3. a[10] &a[i] j 五、编程题(10分) 1. float score[10][3]; main() { int i,j; for (i=0;i<10;i++) {printf(\"\\n\\nInput the %d student's 3 scores:\ for (j=0;j<3;j++) scanf(\"%f\j]);} averstudent(); } averstudent() { int i,j; float s,t,averstu[10],orderave[10]; for (i=0;i<10;i++) {for (j=0,s=0;j<3;j++) s+=score[i][j]; averstu[i]=s/3; orderave[i]=s/3; } for (i=0;i<9;i++) for (j=0;j<9-i;j++) if (orderave[j] orderave[j]=orderave[j+1]; orderave[j+1]=t;} printf(\"\\n\\nThe averages order is:\\n\"); for (i=0;i<10;i++) printf(\"\\n%f\\n\ } 因篇幅问题不能全部显示,请点此查看更多更全内容