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

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

1、计算机二级(C+)上机考试 30及答案解析(总分:-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;cout

2、y) t=x; x=y; y=t; coutz) t=x; x=z; z=t; if(yz) t=y; y=z; z=t; coutx/ty/tz解析:本题考查考生对函数重载与引用调用的掌握。这里的重载是使用不同的参数个数,引用调用的形参使用 public: void print(int x,int y,int z); ; void Table:print (int x,int y,int z) /*2* class Table9:public Table public: void print(); ; void Table9:print() /*3* int x,y,z; for (i=1;i_正确答案:((1) int x; int y; (2) printf( “%d*%d=%d “,x,y,z); if(z解析:主要考查考生将具体问题抽象为类,将类的定义补充完整,并进行类定义测试的能力。注意(2)中格式化输出函数 printf的使用格式,%d 代表输出的为整型。

展开阅读全文
相关资源
猜你喜欢
  • ISO 9846-1993 Solar energy calibration of a pyranometer using a pyrheliometer《太阳能 用日射强度计校准总日射表》.pdf ISO 9846-1993 Solar energy calibration of a pyranometer using a pyrheliometer《太阳能 用日射强度计校准总日射表》.pdf
  • ISO 9847-1992 Solar energy calibration of field pyranometers by comparison to a reference pyranometer《太阳能 与标准总日射表比对校准工作总日射表》.pdf ISO 9847-1992 Solar energy calibration of field pyranometers by comparison to a reference pyranometer《太阳能 与标准总日射表比对校准工作总日射表》.pdf
  • ISO 9848-2003 Photography - Source document microfilms - Determination of ISO speed and ISO average gradient《摄影 原始文件缩微胶片 ISO感光速度和ISO平均梯度的测定》.pdf ISO 9848-2003 Photography - Source document microfilms - Determination of ISO speed and ISO average gradient《摄影 原始文件缩微胶片 ISO感光速度和ISO平均梯度的测定》.pdf
  • ISO 9849-2000 Optics and optical instruments - Geodetic and surveying instruments - Vocabulary《光学和光学仪器 大地测量和勘测仪器 词汇 两种语言版》.pdf ISO 9849-2000 Optics and optical instruments - Geodetic and surveying instruments - Vocabulary《光学和光学仪器 大地测量和勘测仪器 词汇 两种语言版》.pdf
  • ISO 9851-1990 Continuous mechanical handling equipment overhead electrical monorail conveyors definitions and safety rules《连续搬运设备 电动单轨悬挂输送机 定义和安全规则》.pdf ISO 9851-1990 Continuous mechanical handling equipment overhead electrical monorail conveyors definitions and safety rules《连续搬运设备 电动单轨悬挂输送机 定义和安全规则》.pdf
  • ISO 9853-1991 Injection-moulded unplasticized poly(vinyl chloride) (PVC-U) fittings for pressure pipe systems crushing test《压力管道系统用硬聚氯乙烯(PVC-U)管件 扁平试验》.pdf ISO 9853-1991 Injection-moulded unplasticized poly(vinyl chloride) (PVC-U) fittings for pressure pipe systems crushing test《压力管道系统用硬聚氯乙烯(PVC-U)管件 扁平试验》.pdf
  • ISO 9854-1-1994 Thermoplastics pipes for the transport of fluids - Determination of pendulum impact strength by the Charpy method - Part 1 General test method《流.pdf ISO 9854-1-1994 Thermoplastics pipes for the transport of fluids - Determination of pendulum impact strength by the Charpy method - Part 1 General test method《流.pdf
  • ISO 9854-2-1994 Thermoplastics pipes for the transport of fluids - Determination of pendulum impact strength by the Charpy method - Part 2 Test conditions for p.pdf ISO 9854-2-1994 Thermoplastics pipes for the transport of fluids - Determination of pendulum impact strength by the Charpy method - Part 2 Test conditions for p.pdf
  • ISO 9855-1993 Ambient air determination of the particulate lead content of aerosols collected on filters atomic absorption spectrometric method《环境空气 滤器上采集的铅颗粒的测.pdf ISO 9855-1993 Ambient air determination of the particulate lead content of aerosols collected on filters atomic absorption spectrometric method《环境空气 滤器上采集的铅颗粒的测.pdf
  • 相关搜索

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

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