csd1306毕业考试修改版_第1页
csd1306毕业考试修改版_第2页
csd1306毕业考试修改版_第3页
已阅读5页,还剩9页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、csdl306毕业考试修改版Graduatio n exam in ati onFirst, the multiple-choice questions (2 points per game, 40 points)(the following questions are A), B), C) and D) only one option is correct in the four opti on,Please fill in the correct answer in the corresponding location ofthe answer sheet, and don,t score

2、 on the test paper(1) the follow ing procedure segme nt and stateme nt k=a>b (b>c =1:0): 0; fun cti on equivale nt is 一A(A) if (a>B) and (b>C) k=l (if); B (a>B) | (b>C) k=l;Else k=0; else k=0;(C) if (a<=B) k=0; D) if (a>B) k=l;Else if (b<=C) k=l; else if (b>C) k=l;Else

3、k=0; else k=0;(2) the followi ng proceduresMain ()Char K; int I;For (i=l; i<3; i+)seanf ( c ,&k);Switch (k)ease ' O' : printf (' anothern,);Case T' : printf (' numbern,);Whe n the program is running, from the keyboard in put: 01<, en ter, and, after the impleme ntatio n

4、 of the output, the result is D(A) ano ther B) ano ther C) ano ther D) nu mberNumber nu mber nu mber nu mberNumber ano ther nu mber(3) the followi ng proceduresMain ()int, x 二 0, y 二 5, z 二 3;While (z->0&&+x 5) y 二 yT ;Printf ( d, %d, %dn ,x, y, Z);The output after the program is executed

5、 is一- B(A) 3,2,0, 3,2), -1, C) 4,3,一 1, D) 5,一 2, -5, B(4) there are defi niti ons: int, n=0, *p 二&n, *q二 &p; in thefollowi ng opti ons, the correct assig nment stateme nt is(A) p=l: B) *q=2; C) q 二 p; D) *p=5;(5) the followi ng proceduresVoid f (int, V, i nt, w)(int t;T 二 v; v 二 w; w 二 t;Ma

6、in () int, x=l, y 二 3, z=2;If (x>y) f (x, y);Else, if (y>z), f (y, Z):Else f (x, Z);Printf ( d, %d, %dn ,x, y, Z);After executi on, the output is(A) 1,2,3 B) 3, 1,2 C) 1,3,2 D) 2, 3, 1(6) have the follow ing proceduresInt, a10 = l, 2, 3, 4, 5, 6, 7, 8, 9, 10, *p=&a3, b;B=p5:The value in B

7、isA) 5, B) 6, C) 8, D) 9(7) the followi ng proceduresMain ()(char, *p10 = , ABC,"aabdfg", "dcdbe", CD"Printf ( dn After executi on, the output isA) 2, B) 3, C) 4, D) 5in the followi ng stateme nt or stateme nt group, it is possible to assig n a stri ng correctlyA) char *sp;

8、*sp 二"right"char s10; s 二"right"! C) char s10; *s 二;right; D; char; *sp 二;right! ;(9) typedef, struct, ST长人;短 S; int ; char C 2 ;新的;请计算结构体的大小:12 B 14 C 16 D 20(10)在一个C源程序文件中,若要定义一个只允许本源文件中所有函数使用的全局变量,则该变量的存储类应该是()。a. extern b? register c. auto d. static(II ) o下面不支持下标操作的容器是A. 矢量B.

9、 deque 容器C. 列表D. 地图(12) 个类如果没有定义任何函数,编译器不会自动为这个类产生A. 拷贝构造函数B. 无参构造函数C. 输岀流运算符D. 赋值运算符(13) 私人访问属性限制对象的成员可以在一中访问。A. 本类的成员函数B. 主要函数C. 父类的成员函数D. 了类的成员函数(14) 父类和了类各自定义一个成员函数,函数名相同,参数表不同A. 在了类中这两个函数构成重载关系B. 子类不会继承父类的这个函数C. 了类中的函数会覆盖父类中的函数D. 编译时会发生错误(15)o如果MyClass类定义了拷贝构造函数和一个整型参数的构造 函数,还重载了赋值运算符,那么语句MyCla

10、ss 对象二 100;会 ;A. 调用拷贝构造函数B. 调用整型参数的构造函数C. 调用赋值运算符D. 引起编译错误(16) o抽象类指的是;A. 没有任何成员的类B. 只有成员函数没有数据成员的类C. 有虚函数的类D. 有纯虚函数的类(17)多态性是通过 实现的。A. 构造函数B. 析构函数C. 虚函数D. 函数重载(18)判断一个of stream类对象文件打开文件是否失败,应该判断OA. 创建文件流对象时是否抛出异常 打开成员函数的返回值C. 外汇经营资金成员函数的返回值D. !文件是否为真(19)二叉查找树按一遍历时访问到节点的数据是排好序的。A. 前序B. 中序C. 后序D. 层次(20)如果在尝试块中用抛出“错误”语句抛岀一个异常,则参数类型是 的抓块能够捕获这个异常。答:char *常量char *C.字符D. const char二问答题(每题5分)1, C+中函数的重载的定义?2o怎么理解动态绑定和静态绑定?

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论