- 3
- 0
- 约3.7千字
- 约 3页
- 2023-04-30 发布于湖北
- 举报
2009-2010 学年 1 学期 C 语言程序设计 (C) 课程考试试题
拟题学院(系) : 信息科学与技术学院 拟题人 :
适 用 专 业: 信息 08 级,通信 08 级 校对人 :
(答案写在答题纸上,写在试题纸上无效)
.Choose the right answer (30 marks) .
Determine the output of the following statement: printf(%d, M - N);
A) M - N B) M - N
B) 3 D) 1
Which of following is an illegal user-define symbol?
A) scanf B) _123 C)C$ D)var
Which statement is not a C statement?
C) {int a; a++;} B) z = 20, a += c;
C) ; D) { ; }
4. Which operator can only be applied to integers?
A) %= B) /
C) = D) =
Determine the output of the following program. void main()
{
int y=8,x=7;
printf(%d %d\n, ++x, y++);
}
A) 7,8
B) 9,7
C) 8,8
D) 8,9
6.
Choose the wrong definition for the character strings.
A) char str[4]= “QUST ”;
B) char str[]=
“QUST ”;
C) char *str=
“QUST ”;
D) char str[]={ Q’‘,U ’‘,S’‘,T’,‘‘\0’ };
7.
Determine the output of the following program.
void main()
{
int i, j, m = 0;
for(i=1 ; i=15 ; i+=5)
for(j=3 ; j=19 ;j+=3)
1
m++;
}
printf(%d\n,m);
A) 12 B) 15 C) 18 D) 25
For the 2-dimensional array int b[][3]={{1,0,-1},{10,12},{8,3,9},{0}}; the value for the b[2][1] is______.
A) 8 B) 5 C)3 D) 12
9. In the statement while(x), choose the equivalent expression for the x.
A)x==0 B)x==1 C)x!=1 D) x!=0
10. For the following codes: int z=5, *p=z; the value of the *p is_______.
A) the address of c B)unknown value
C)the address of p D)5
In order to assign 45 to variant a and assign 64 to variant b with the statement scanf(“%d%d ”, a, b), which input format is correct?
A) 45 64
B) 45, 64
C) 45;64
D) 4564
12. What is the byte length of the string “\t\\abcd”.
A) 6
B) 7
C) 8
D) 9
Determine the output of the value of b. Int a[4][2] = {1,2,3,4,5,6,7,8};
b = *(*(a + 2) + 1);
A) 3
B) 4
C) 5
D) 6
Determine the output of the following program: main()
{
int n = 8; while (n 5)
{
n--;
printf( “%d”, n);
}
}
A) 876
B) 765
C) 8765
D) 7654
15. What is the functionality of function “rewind ”?
A) open the file again;
2
return the length of the file
push the pointer to the end of the file
push the pointer to
您可能关注的文档
- 呼吸衰竭护理查房.ppt
- 废旧电池对环境的污染_2.ppt
- 书香家庭活动方案.doc
- 第5次课-主机防火墙和杀毒软件.pdf
- 高中考试自我反思表.doc
- 大学生自我介绍(精选15篇).doc
- 大学生自我介绍(精选13篇).doc
- 中小学读书日海报手抄报【Word编辑版】.doc
- 大学生自我介绍10篇.doc
- 碱度分析原始记录表.doc
- 统编版2025年春季新版七年级下册历史 第21课 明清时期的科技与文化 教案.docx
- 雅安雨城法院书记员招聘考试真题库2025.docx
- 2026届安徽合肥市高考一模高考语文试卷试题(含答案详解).pdf
- 【专题研究】国内外城市更新研究的最新进展.pdf
- 【专题研究】老旧城区改造居民满意度影响因素研究——以遂宁市老旧城区改造为例.pdf
- 【专题研究】关于旧城空间改造理论与创意设计案例的几点思考.pdf
- 西藏拉萨市高三下学期期末物理备考重点详解.docx
- 泾县法院书记员招聘笔试真题2025.pdf
- 2026年春【苏教版】-六年级数学下册-面积的变化.pptx
- 2026年春【苏教版】-六年级数学下册-7.pptx
原创力文档

文档评论(0)