中山大学信息科学及技术学院计算机科学系C程序设计A2014.06试卷

中山大学信息科学及技术学院计算机科学系C程序设计A2014.06试卷

ID:36411564

大小:178.00 KB

页数:9页

时间:2019-05-10

中山大学信息科学及技术学院计算机科学系C程序设计A2014.06试卷_第1页
中山大学信息科学及技术学院计算机科学系C程序设计A2014.06试卷_第2页
中山大学信息科学及技术学院计算机科学系C程序设计A2014.06试卷_第3页
中山大学信息科学及技术学院计算机科学系C程序设计A2014.06试卷_第4页
中山大学信息科学及技术学院计算机科学系C程序设计A2014.06试卷_第5页
资源描述:

《中山大学信息科学及技术学院计算机科学系C程序设计A2014.06试卷》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、警示《中山大学授予学士学位工作细则》第六条考试作弊不授予学士学位计算机科学系2014学年度第二学期《程序设计II》期末考试试题(A)任课教师:吴维刚刘聪考试形式:闭卷考试时间:2小时年级:班别:专业:姓名:_____学号:_成绩1.SingleChoice(20points)Pleasechoosethechoicethatbestcompletesthestatementinthequestion1)Whichofthefollowingstatementsaboutobject-orientedprogramming(OOP)isNOTcorrect?A)ThekeyideaofOOPis

2、tobuildprogramsusingsoftwareobject.B)OOPoffersmanyadvantages:simplicity,modularity,modifiability,andsoon.C)OOPismoreefficientthanPOPintermsofprogrammingproductivity.D)Anobject-orientedprogramcanrunfasterthanaprocedure-orientedprogramwiththesamefunctionality.2)Whichofthefollowingstatementsaboutstatic

3、datamembersisNOTcorrect?A)Astaticdatamembercaninitializedatdeclaration.B)Astaticdatamemberreferstoamemberwhosevaluecannotbechangedafterinitialized.C)Wemayaccessstaticdatamemberswithoutbeforeanyobjectcreated.D)Astaticdatamemberissharedbyobjectsofthesameclass.3)Whichofthefollowingvariablescannotbeamem

4、berofclassA?A)A*pB)AaC)A&rD)strings4)Whichofthefollowingstatementsisnotacharacteristicofaconstructor?A)Thenameofaconstructormustbethesameastheclass.B)Aconstructorcanbeoverloaded.C)Theparametersofconstructormayhavedefaultvalues.D)Thereturntypeofaconstructormustbe"void".5)IfCisaclassname,howmanytimesi

5、stheconstructorofCcalledin"Ca,b[2],*p[2];"?A)2B)3C)4D)56)Ifpisapointertoanobjectwithamemberfunctionx(),whichofthefollowingaccesstox()iscorrect?A)*p.xB)p->x()C)*p->x()D)*p.x()91)WhichofthefollowingisNOTamemberfunctionofaclass?A)constructorB)destructorC)friendfunctionD)copyconstructor2)IfclassXisdecla

6、redtobethefriendofaclassY,thenwhichofthefollowingstatementsiscorrect?A)YcanaccesstheprotectedmembersofX.B)XcanaccesstheprivatemembersofY.C)IfclassZisdeclaredtobefriendofX,ZbecomesY'sfriend.D)YbecomesX’sfriendautomatically3)Whichofthefollowingdeclarationsofconstantfunctionmemberiscorrect?A)voidprint(

7、)const;B)constvoidprint();C)voidconstprint();D)voidprint(const);4)Torealizepolymorphism,thefollowingtwoelementsarenecessary:A)Multiple-inheritanceandvirtualfunctionB)Virtualinheritanceandfunctionoverl

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

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

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