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

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

1、计算机二级(C+)上机考试 7 及答案解析(总分:-3.00,做题时间:90 分钟)1.改错题 使用 VC6 打开考生文件夹下的工程 test1_1,此工程包含一个源程序文件 test1_1.cpp,但该程序运行有问题,请改正 main 函数中的错误,使该程序的输出结果如下: Constructor called. Default constructor called. Area is 6 Area is 0 Area is 6 源程序文件 test1_1.cpp 清单如下: #include class RectAngle private: double ledge,sedge; publi

2、c: RectAngle() coutenglish; coutcomputer; void Student:computesum() total=english+computer; coutenglish; coutcomputer; void Student:computesum() total=english+computer; coutcode; (3) int tempcode,tempsum; tempcode=(*A0).getcode(); )解析:本题是对 C+程序设计的综合考查,其设计类的成员及成员函数的定义与调用,数据的输入输出,for 循环语句,if 条件判断语句等多个知识点,注意(3)中指针数组的使用,指针数组是一组指针,每一个成员都按照指针的操作规则,但是整个访问规则仍然使用数组下标方式,如 A0指的是第一个指针,而* A0是取出第一个指针指向的内容。

展开阅读全文
相关资源
猜你喜欢
  • EN 4247-2005 en Aluminium alloy AL-P2024-T42 Plate 6 mm Less Than a Less Than or Equal to 140 mm《航空航天系列 铝合金AL-P2024-T42 板材 6 mm≤a≤140 mm》.pdf EN 4247-2005 en Aluminium alloy AL-P2024-T42 Plate 6 mm Less Than a Less Than or Equal to 140 mm《航空航天系列 铝合金AL-P2024-T42 板材 6 mm≤a≤140 mm》.pdf
  • EN 425-2002 en Resilient and Laminate Floor Coverings - Castor Chair Test《弹性地板和叠层地板覆盖物 椅子脚轮效应试验》.pdf EN 425-2002 en Resilient and Laminate Floor Coverings - Castor Chair Test《弹性地板和叠层地板覆盖物 椅子脚轮效应试验》.pdf
  • EN 4250-2001 en Aerospace series - Nickel base alloys NI-B41001 (NiCr19Si7B) - Filler metal for brazing - Amorphous foil《航空航天系列 镍基合金NI-B41001(NiCr19Si7B) 硬钎焊填充金属》.pdf EN 4250-2001 en Aerospace series - Nickel base alloys NI-B41001 (NiCr19Si7B) - Filler metal for brazing - Amorphous foil《航空航天系列 镍基合金NI-B41001(NiCr19Si7B) 硬钎焊填充金属》.pdf
  • EN 4258-1998 en Aerospace Series - Metallic Materials - General Organization of Standardization - Links between Types of EN Standards and Their Use《金属材料 标准化的一般组织 欧洲标准的类型和其使用之间的链接》.pdf EN 4258-1998 en Aerospace Series - Metallic Materials - General Organization of Standardization - Links between Types of EN Standards and Their Use《金属材料 标准化的一般组织 欧洲标准的类型和其使用之间的链接》.pdf
  • EN 4262-2013 en Aerospace series - Heat resisting alloy FE-PA4901 (X12CrNiCoMoW21-20) - As forged - Forging stock - a or D 200 mm - 690 MPa Rm 880MPa《航空航天系列 FE-PA4901 (X12CrNiCoMoW.pdf EN 4262-2013 en Aerospace series - Heat resisting alloy FE-PA4901 (X12CrNiCoMoW21-20) - As forged - Forging stock - a or D 200 mm - 690 MPa Rm 880MPa《航空航天系列 FE-PA4901 (X12CrNiCoMoW.pdf
  • EN 4263-2013 en Aerospace series - Heat resisting alloy FE-PA4901 (X12CrNiCoMoW21-20) - As forged - Forging stock - a or D 200 mm - 690 MPa Rm 960MPa《航空航天系列 FE-PA4901 (X12CrNiCoMoW.pdf EN 4263-2013 en Aerospace series - Heat resisting alloy FE-PA4901 (X12CrNiCoMoW21-20) - As forged - Forging stock - a or D 200 mm - 690 MPa Rm 960MPa《航空航天系列 FE-PA4901 (X12CrNiCoMoW.pdf
  • EN 4265-2013 en Aerospace series - Bearing spherical plain metal to metal in corrosion resisting steel - Wide series - Dimensions and loads - Inch series《航空航天系列 轴承球平原 金属对金属的耐腐蚀钢-宽系.pdf EN 4265-2013 en Aerospace series - Bearing spherical plain metal to metal in corrosion resisting steel - Wide series - Dimensions and loads - Inch series《航空航天系列 轴承球平原 金属对金属的耐腐蚀钢-宽系.pdf
  • EN 4266-2013 en Aerospace series - Bearing spherical plain metal to metal in corrosion resisting steel cadmium plated - Wide series - Dimensions and loads - Inch series《航空航天系列 耐腐蚀钢.pdf EN 4266-2013 en Aerospace series - Bearing spherical plain metal to metal in corrosion resisting steel cadmium plated - Wide series - Dimensions and loads - Inch series《航空航天系列 耐腐蚀钢.pdf
  • EN 4267-2001 en Aerospace Series - Round Bars in Titanium and Titanium Alloys - Diameter 6 mm Less Than or Equal to D Less Than or Equal to 160 mm - Dimensions《航空航天系列 钛和钛合金制成的圆形棒 直.pdf EN 4267-2001 en Aerospace Series - Round Bars in Titanium and Titanium Alloys - Diameter 6 mm Less Than or Equal to D Less Than or Equal to 160 mm - Dimensions《航空航天系列 钛和钛合金制成的圆形棒 直.pdf
  • 相关搜索

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

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