【计算机类职业资格】国家二级C++机试(操作题)模拟试卷387及答案解析.doc

上传人:towelfact221 文档编号:1331885 上传时间:2019-10-17 格式:DOC 页数:3 大小:32.50KB
下载 相关 举报
【计算机类职业资格】国家二级C++机试(操作题)模拟试卷387及答案解析.doc_第1页
第1页 / 共3页
【计算机类职业资格】国家二级C++机试(操作题)模拟试卷387及答案解析.doc_第2页
第2页 / 共3页
【计算机类职业资格】国家二级C++机试(操作题)模拟试卷387及答案解析.doc_第3页
第3页 / 共3页
亲,该文档总共3页,全部预览完了,如果喜欢就下载吧!
资源描述

1、国家二级 C+机试(操作题)模拟试卷 387及答案解析(总分:6.00,做题时间:90 分钟)一、基本操作题(总题数:1,分数:2.00)1.使用 VC6打开考生文件夹下的源程序文件 modilcpp,请修改程序中的错误,使程序能得出正确的结果: num:0 num:1 num:10 注意:不要改动 main函数,不能增行或删行,也不能更改程序的结构,错误的语句在 *error*的下面。 #include int i=10; Class TestClass public: TestClass(int i) coutm Other; ; *2* int main() TestClass obj(

2、11); *4* couti=i+1;或 TestClass:i=i+1:或(*this)i=i+1; (2)TestClass print(0); (3)coutm Other; ; *2* int main() TestClass obj(11); *4* cout_正确答案:(正确答案:(1)添加语句: static int m Number; (2)添加语句: int TestClass:m Number=10; (3)添加语句: static int get(Testclass* obj) (4)将“cout objget(obj)endl;)解析:解析:本题中程序的功能是利用 get函数计算对象成员数值的和。在 VC环境下打开程序,根据题干给出的几条功能要求,对程序中给出注释下的内容逐个补全或修改。从己定源程序的 main主函数开始入手,可以看出程序通过调用类 TestClass和 get()成员函数实现各种输出操作

展开阅读全文
相关资源
猜你喜欢
  • AECMA PREN 4256-1997 Aerospace Series Nuts Anchor Self-Locking Fixed Two Lug Reduced Series with Counterbore in Heat Resisting Steel Silver Plated Classification  1 100 MPa (at Amb.pdf AECMA PREN 4256-1997 Aerospace Series Nuts Anchor Self-Locking Fixed Two Lug Reduced Series with Counterbore in Heat Resisting Steel Silver Plated Classification 1 100 MPa (at Amb.pdf
  • AECMA PREN 4258-1995 Aerospace Series Metallic Materials General Organization of Standardization Links Between Types of EN Standards and Their Use Edition P 1《航空系列 金属物质一般规范在EN标准和用途.pdf AECMA PREN 4258-1995 Aerospace Series Metallic Materials General Organization of Standardization Links Between Types of EN Standards and Their Use Edition P 1《航空系列 金属物质一般规范在EN标准和用途.pdf
  • AECMA PREN 4259-2000 Aerospace Series Metallic Materials Definition of General Terms Edition P 1《航空系列 金属物质总括.P1版》.pdf AECMA PREN 4259-2000 Aerospace Series Metallic Materials Definition of General Terms Edition P 1《航空系列 金属物质总括.P1版》.pdf
  • AECMA PREN 4260-1996 Aerospace Series Metallic Materials Rules for Drafting and Presentation of Technical Specifications Edition P 1《航空系列 金属物质提案和展示技术规范.P1版》.pdf AECMA PREN 4260-1996 Aerospace Series Metallic Materials Rules for Drafting and Presentation of Technical Specifications Edition P 1《航空系列 金属物质提案和展示技术规范.P1版》.pdf
  • AECMA PREN 4261-1996 Aerospace Series Metallic Materials Rules for Drafting and Presentation of Test Method Standards Edition P 1《航空系列 金属物质提案和展示试验方法标准.P1版》.pdf AECMA PREN 4261-1996 Aerospace Series Metallic Materials Rules for Drafting and Presentation of Test Method Standards Edition P 1《航空系列 金属物质提案和展示试验方法标准.P1版》.pdf
  • AECMA PREN 4262-1996 Aerospace Series Heat Resisting Alloy FE-PA4901 (X12CrNiCoMoW21-20) as Forged Forging Stock a or D Less Than or Equal to 200 mm 690 MPa Less Than or Equal to R.pdf AECMA PREN 4262-1996 Aerospace Series Heat Resisting Alloy FE-PA4901 (X12CrNiCoMoW21-20) as Forged Forging Stock a or D Less Than or Equal to 200 mm 690 MPa Less Than or Equal to R.pdf
  • AECMA PREN 4263-1996 Aerospace Series Heat Resisting Alloy FE-PA4901 (X12CrNiCoMoW21-20) as Forged Forging Stock a or D Less Than or Equal to 200 mm 690 MPa Less Than or Equal to R.pdf AECMA PREN 4263-1996 Aerospace Series Heat Resisting Alloy FE-PA4901 (X12CrNiCoMoW21-20) as Forged Forging Stock a or D Less Than or Equal to 200 mm 690 MPa Less Than or Equal to R.pdf
  • AECMA PREN 4264-1996 Aerospace Series Heat Resisting Alloy FE-PA2501 (X4NiCrMoTi43-13) as Forged Forging Stock a or D Less Than or Equal to 200 mm Edition P 1《航空系列 抗热合金FE-PA2501(X4.pdf AECMA PREN 4264-1996 Aerospace Series Heat Resisting Alloy FE-PA2501 (X4NiCrMoTi43-13) as Forged Forging Stock a or D Less Than or Equal to 200 mm Edition P 1《航空系列 抗热合金FE-PA2501(X4.pdf
  • AECMA PREN 4265-1996 Aerospace Series Bearings Spherical Plain in Corrosion Resisting Steel Wide Series - Dimensions and Loads Inch Series Edition P 1《航空系列 轴承球形抗腐蚀钢宽系列尺寸负载英尺系列.P1版》.pdf AECMA PREN 4265-1996 Aerospace Series Bearings Spherical Plain in Corrosion Resisting Steel Wide Series - Dimensions and Loads Inch Series Edition P 1《航空系列 轴承球形抗腐蚀钢宽系列尺寸负载英尺系列.P1版》.pdf
  • 相关搜索

    当前位置:首页 > 考试资料 > 职业资格

    copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
    备案/许可证编号:苏ICP备17064731号-1