【计算机类职业资格】计算机二级(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 代表输出的为整型。

展开阅读全文
相关资源
猜你喜欢
  • ASD-STAN PREN 3844-2-1995 Aerospace Series Flammability of Non Metallic Materials Part 2  Small Burner Test Horizontal Determination of the Horizontal Flame Propagation (Edition P .pdf ASD-STAN PREN 3844-2-1995 Aerospace Series Flammability of Non Metallic Materials Part 2 Small Burner Test Horizontal Determination of the Horizontal Flame Propagation (Edition P .pdf
  • ASD-STAN PREN 3844-2-2018 Aerospace series Flammability of non-metallic materials Part 2 Small burner test horizontal Determination of the horizontal flame propagation (Edition P 2.pdf ASD-STAN PREN 3844-2-2018 Aerospace series Flammability of non-metallic materials Part 2 Small burner test horizontal Determination of the horizontal flame propagation (Edition P 2.pdf
  • ASD-STAN PREN 3844-3-1995 Aerospace Series Flammability of Nom Metallic Materials Part 3  Small Burner Test 45 Degrees Determination of the Resistance of Material to Flame and Glow.pdf ASD-STAN PREN 3844-3-1995 Aerospace Series Flammability of Nom Metallic Materials Part 3 Small Burner Test 45 Degrees Determination of the Resistance of Material to Flame and Glow.pdf
  • ASD-STAN PREN 3844-3-2018 Aerospace series Flammability of non-metallic materials Part 3 Small burner test 45 etermination of the resistance of material to flame and glow propagati.pdf ASD-STAN PREN 3844-3-2018 Aerospace series Flammability of non-metallic materials Part 3 Small burner test 45 etermination of the resistance of material to flame and glow propagati.pdf
  • ASD-STAN PREN 3847-1997 Aerospace Series Paints and Varnishes Determination of the Sedimentation Rating (Edition P 2)《航空航天系列 油漆和清漆 沉淀等级的测定 第P2版》.pdf ASD-STAN PREN 3847-1997 Aerospace Series Paints and Varnishes Determination of the Sedimentation Rating (Edition P 2)《航空航天系列 油漆和清漆 沉淀等级的测定 第P2版》.pdf
  • ASD-STAN PREN 3848-1996 Aerospace Series Semi-Finished Metallic Products Methods of Measuring from Deviations (Edition P2)《航空航天系列 半成品金属制品 偏差测定方法 第P2版》.pdf ASD-STAN PREN 3848-1996 Aerospace Series Semi-Finished Metallic Products Methods of Measuring from Deviations (Edition P2)《航空航天系列 半成品金属制品 偏差测定方法 第P2版》.pdf
  • ASD-STAN PREN 3851-1995 Aerospace Series Pipe Couplings 60 Degrees Spherical in Titanium Alloy TI-P64001 Swivel Nuts Straight (Edition P1)《航空航天系列 钛合金TI-P64001制带直型旋转螺母的球形60°管接头 第P1版.pdf ASD-STAN PREN 3851-1995 Aerospace Series Pipe Couplings 60 Degrees Spherical in Titanium Alloy TI-P64001 Swivel Nuts Straight (Edition P1)《航空航天系列 钛合金TI-P64001制带直型旋转螺母的球形60°管接头 第P1版.pdf
  • ASD-STAN PREN 3852-1995 Aerospace Series Pipe Couplings 60 Degrees Spherical in Titanium Alloy TI-P64001 Straight Unions Welded Threaded (Edition P1)《航空航天系列 钛合金TI-P64001制带螺纹焊接直连接管的.pdf ASD-STAN PREN 3852-1995 Aerospace Series Pipe Couplings 60 Degrees Spherical in Titanium Alloy TI-P64001 Straight Unions Welded Threaded (Edition P1)《航空航天系列 钛合金TI-P64001制带螺纹焊接直连接管的.pdf
  • ASD-STAN PREN 3853-1995 Aerospace Series Pipe Couplings 60 Degree Spherical in Titanium Alloy TI-P64001 Straight Unions Threaded (Edition P 1)《航空航天系列 钛合金TI-P64001制带螺纹焊接直连接管的球形60°管接.pdf ASD-STAN PREN 3853-1995 Aerospace Series Pipe Couplings 60 Degree Spherical in Titanium Alloy TI-P64001 Straight Unions Threaded (Edition P 1)《航空航天系列 钛合金TI-P64001制带螺纹焊接直连接管的球形60°管接.pdf
  • 相关搜索

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

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