【计算机类职业资格】计算机二级(C++)上机考试4及答案解析.doc

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

1、计算机二级(C+)上机考试 4 及答案解析(总分:-3.00,做题时间:90 分钟)1.改错题 使用 VC6 打开考生文件夹下的工程 test7_1,此工程包含一个源程序文件 test7_1.cpp,但该程序运行有问题,请改正程序中的错误,使程序的输出结果如下: Constructor1 Constructor1 Constructor1 Destructor Constructor2 Destructor x=0 x=5 Destructor Destructor 源程序文件test1_1.cpp 清单如下: #include class B int x; public: B()x=0;co

2、utdisp(); (分数:-1.00)_计算机二级(C+)上机考试 4 答案解析(总分:-3.00,做题时间:90 分钟)1.改错题 使用 VC6 打开考生文件夹下的工程 test7_1,此工程包含一个源程序文件 test7_1.cpp,但该程序运行有问题,请改正程序中的错误,使程序的输出结果如下: Constructor1 Constructor1 Constructor1 Destructor Constructor2 Destructor x=0 x=5 Destructor Destructor 源程序文件test1_1.cpp 清单如下: #include class B int x; public: B()x=0;coutdisp(); (分数:-1.00)_正确答案:((1) int x; int y; (2) base:x=a; base:y=b; (3) cout“三角形面积:“x*y*0.5解析:本题考查考生对类的继承与派生的掌握,包括派生类对基类成员的访问和派生类构造函数的定义等知识点。其中(4)是对类的构造函数设定参数的缺省值,该函数应该实现将参数传递给基类的功能。

展开阅读全文
相关资源
猜你喜欢
  • ASTM C1308-2008 Standard Test Method for Accelerated Leach Test for Diffusive Releases from Solidified Waste and a Computer Program to Model Diffusive Fractional Leaching from Cyli.pdf ASTM C1308-2008 Standard Test Method for Accelerated Leach Test for Diffusive Releases from Solidified Waste and a Computer Program to Model Diffusive Fractional Leaching from Cyli.pdf
  • ASTM C1308-2008(2017) Standard Test Method for Accelerated Leach Test for Diffusive Releases from Solidified Waste and a Computer Program to Model Diffusive Fractional Leaching fro.pdf ASTM C1308-2008(2017) Standard Test Method for Accelerated Leach Test for Diffusive Releases from Solidified Waste and a Computer Program to Model Diffusive Fractional Leaching fro.pdf
  • ASTM C1309-1997(2003) Standard Practice for Performance Evaluation of In-Plant Walk-Through Metal Detectors《内置穿过式金属检测器的性能评定的标准规程》.pdf ASTM C1309-1997(2003) Standard Practice for Performance Evaluation of In-Plant Walk-Through Metal Detectors《内置穿过式金属检测器的性能评定的标准规程》.pdf
  • ASTM C1309-1997(2012) Standard Practice for Performance Evaluation of In-Plant Walk-Through Metal Detectors 《内置穿过式金属探测器性能评估的标准操作规程》.pdf ASTM C1309-1997(2012) Standard Practice for Performance Evaluation of In-Plant Walk-Through Metal Detectors 《内置穿过式金属探测器性能评估的标准操作规程》.pdf
  • ASTM C131 C131M-2014 Standard Test Method for Resistance to Degradation of Small-Size Coarse Aggregate by Abrasion and Impact in the Los Angeles Machine《用洛杉机磨耗试验机测定小规格粗集料的抗磨性与抗冲击性的.pdf ASTM C131 C131M-2014 Standard Test Method for Resistance to Degradation of Small-Size Coarse Aggregate by Abrasion and Impact in the Los Angeles Machine《用洛杉机磨耗试验机测定小规格粗集料的抗磨性与抗冲击性的.pdf
  • ASTM C131-2006 Standard Test Method for Resistance to Degradation of Small-Size Coarse Aggregate by Abrasion and Impact in the Los Angeles Machine《用洛杉机磨耗试验机测定小规格粗集料的抗磨性与抗冲击性的标准试验方.pdf ASTM C131-2006 Standard Test Method for Resistance to Degradation of Small-Size Coarse Aggregate by Abrasion and Impact in the Los Angeles Machine《用洛杉机磨耗试验机测定小规格粗集料的抗磨性与抗冲击性的标准试验方.pdf
  • ASTM C1311-2002 Standard Specification for Solvent Release Sealants《溶剂释放器密封剂的标准规范》.pdf ASTM C1311-2002 Standard Specification for Solvent Release Sealants《溶剂释放器密封剂的标准规范》.pdf
  • ASTM C1311-2010 Standard Specification for Solvent Release Sealants《溶剂释放器密封件的标准规范》.pdf ASTM C1311-2010 Standard Specification for Solvent Release Sealants《溶剂释放器密封件的标准规范》.pdf
  • ASTM C1311-2014 Standard Specification for Solvent Release Sealants《溶剂释放密封剂的标准规格》.pdf ASTM C1311-2014 Standard Specification for Solvent Release Sealants《溶剂释放密封剂的标准规格》.pdf
  • 相关搜索

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

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