收藏 分销(赏)

C语言英文试题.doc

上传人:w****g 文档编号:6172987 上传时间:2024-11-29 格式:DOC 页数:3 大小:54.05KB
下载 相关 举报
C语言英文试题.doc_第1页
第1页 / 共3页
C语言英文试题.doc_第2页
第2页 / 共3页
C语言英文试题.doc_第3页
第3页 / 共3页
亲,该文档总共3页,全部预览完了,如果喜欢就下载吧!
资源描述

1、课程考试试题学期学年 2009-2010 1 C语言程序设计(C) 拟题人:校对人:拟题学院(系): 适 用 专 业: 信息科学与技术学院 信息08级,通信08级 (答案写在答题纸上,写在试题纸上无效).Choose the right answer (30 marks).1. Determine the output of the following statement:printf(%d, M - N);A) M - NB) M - NB) 3D) 12. Which of following is an illegal user-define symbol?A) scanf B) _12

2、3 C)C$ D)var3. 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) =5. Determine the output of the following program.void main()int y=8,x=7;printf(%d %dn, +x, y+);A) 7,8 B) 9,7 C) 8,8 D) 8,96. Choose the wro

3、ng definition for the character strings. A) char str4= “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 5)n-;printf(“%d”, n);A) 876 B) 765 C) 8765D) 765415. What is the fu

4、nctionality of function “rewind”?A) open the file again;B) return the length of the fileC) push the pointer to the end of the fileD) push the pointer to the beginning of the fileII. Short answer questions.(30 marks)1. a. Enumerate workflow control methods in C programming language. (5 marks)b. Give

5、a simple C program to show the basic parts of a C program.(5 marks)2. a. The following program takes user input number and display the multiplication result of (num + num) in the next line on the screen, but it alway displays the wrong result. Determine where the errors are and why the program can n

6、ever give the correct result. (8 marks)#include void main()int num;printf(Enter a letter: );scanf(%d, num); num = num * num;printf(The result of num + num is %d, &num);b. Modify the program so it will display the proper result. (12 marks)III. Write the programs. (40 marks)1. Given an array a9, fill

7、a with random values, then write a sorting method to sort the data in a and display the result. (10 marks)2. (a) Write a function named min( ) that accepts 5 integers as input , which calculates and returns the maximum value among them. The 5 integer numbers should be arrange into an integer array,

8、and passed to the function min( ). (5 marks)(b) Include the function in a working program. Make sure your function is called from main() and correctly returns a value to main(). Display the value returned by min() in main(). (5 marks) 3. Write a program that declares a single-dimensional arrays named num,. The numbers to be stored in num are 45, 86, 12, 37, 28, 113. Sum odds and evens separately. Finally, give the results that will be displayed on the screen. (10 marks)4.Given a function:Write a program to accept the user input for x, and display the value of y.3

展开阅读全文
部分上传会员的收益排行 01、路***(¥15400+),02、曲****(¥15300+),
03、wei****016(¥13200+),04、大***流(¥12600+),
05、Fis****915(¥4200+),06、h****i(¥4100+),
07、Q**(¥3400+),08、自******点(¥2400+),
09、h*****x(¥1400+),10、c****e(¥1100+),
11、be*****ha(¥800+),12、13********8(¥800+)。
相似文档                                   自信AI助手自信AI助手
搜索标签

当前位置:首页 > 包罗万象 > 大杂烩

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        获赠5币

©2010-2025 宁波自信网络信息技术有限公司  版权所有

客服电话:4008-655-100  投诉/维权电话:4009-655-100

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :gzh.png    weibo.png    LOFTER.png 

客服