[计算机类试卷]国家二级C++机试(操作题)模拟试卷112及答案与解析.doc

上传人:postpastor181 文档编号:497169 上传时间:2018-11-28 格式:DOC 页数:7 大小:33.50KB
下载 相关 举报
[计算机类试卷]国家二级C++机试(操作题)模拟试卷112及答案与解析.doc_第1页
第1页 / 共7页
[计算机类试卷]国家二级C++机试(操作题)模拟试卷112及答案与解析.doc_第2页
第2页 / 共7页
[计算机类试卷]国家二级C++机试(操作题)模拟试卷112及答案与解析.doc_第3页
第3页 / 共7页
[计算机类试卷]国家二级C++机试(操作题)模拟试卷112及答案与解析.doc_第4页
第4页 / 共7页
[计算机类试卷]国家二级C++机试(操作题)模拟试卷112及答案与解析.doc_第5页
第5页 / 共7页
点击查看更多>>
资源描述

1、国家二级 C+机试(操作题)模拟试卷 112及答案与解析 一、基本操作题 1 使用 VC6打开考生文件夹下的源程序文件 modil epp,但该程序运行有问题,请改正 main函数中的错误,使程序的输出结果是: nember=l nember=10 nember: 100 注意:不要改动 main函数,不能增行或删行,也不能更改程序的结构,错误的语句在 *error*的下面。 #lnclude C1ass TeStClass public: TestClass(int i) nember=i; void SetNember(int m) nember=m; int GetNember()con

2、st( return nember; void Print()const cout #include #include using namespace std ; void WriteFile(int c) ofstream outl ; outl open(”modi2 txt”, ios base: binary I losbase: app); outl C1ass CHumanInf0 private: int height; int weight; *1* public: *2* : height(ht), weight(wt), bloodType(bt); CHumanInfo(

3、CHumanlnfo int GetHeight() return height; int GetWeight() return weight; int GetBloodType() return bloodType; void SetInfo(int ht, int wt, char bt); void Display(); ); *3* height=ht; weight=wt ; bloodType=bt; void CHumanInfo: Display() cout: (),故第 3个标识下应添加“voidCHumanlnfo: Setlnfo(int ht, int wt, char bt)”。 (4)调用函数 Setlnf00需要 3个参数,程序要求把对象 d2的三个私有数据成员分别设定为身高 170,体重 64,血型为 B,即把这三个值传入函数 SetlnfoO,因此第 4个标识下应添加 “h2 Setlnfo(170, 64, B); ”0

展开阅读全文
相关资源
猜你喜欢
  • ASTM C1353-2007 Standard Test Method Using the Taber Abraser for Abrasion Resistance of Dimension Stone Subjected to Foot Traffic《行人交通用规格石料的耐磨损性用泰伯磨损机的标准试验方法》.pdf ASTM C1353-2007 Standard Test Method Using the Taber Abraser for Abrasion Resistance of Dimension Stone Subjected to Foot Traffic《行人交通用规格石料的耐磨损性用泰伯磨损机的标准试验方法》.pdf
  • ASTM C1353-2008 Standard Test Method Using the Taber Abraser for Abrasion Resistance of Dimension Stone Subjected to Foot Traffic.pdf ASTM C1353-2008 Standard Test Method Using the Taber Abraser for Abrasion Resistance of Dimension Stone Subjected to Foot Traffic.pdf
  • ASTM C1353-2009 Standard Test Method for Abrasion Resistance of Dimension Stone Subjected to Foot Traffic Using a Rotary Platform Double-Head Abraser《人行道用规格石料的耐磨损性的标准试验方法(旋转台式双头磨蚀机.pdf ASTM C1353-2009 Standard Test Method for Abrasion Resistance of Dimension Stone Subjected to Foot Traffic Using a Rotary Platform Double-Head Abraser《人行道用规格石料的耐磨损性的标准试验方法(旋转台式双头磨蚀机.pdf
  • ASTM C1354 C1354M-2009 Standard Test Method for Strength of Individual Stone Anchorages in Dimension Stone《土方石独立石桥墩的强度的标准试验方法》.pdf ASTM C1354 C1354M-2009 Standard Test Method for Strength of Individual Stone Anchorages in Dimension Stone《土方石独立石桥墩的强度的标准试验方法》.pdf
  • ASTM C1354 C1354M-2015 Standard Test Method for Strength of Individual Stone Anchorages in Dimension Stone《规格石料独立石桥墩强度的标准试验方法》.pdf ASTM C1354 C1354M-2015 Standard Test Method for Strength of Individual Stone Anchorages in Dimension Stone《规格石料独立石桥墩强度的标准试验方法》.pdf
  • ASTM C1354-1996(2004) Standard Test Method for Strength of Individual Stone Anchorages in Dimension Stone《土方石独立石桥墩的强度的标准试验方法》.pdf ASTM C1354-1996(2004) Standard Test Method for Strength of Individual Stone Anchorages in Dimension Stone《土方石独立石桥墩的强度的标准试验方法》.pdf
  • ASTM C1355 C1355M-1996(2006) Standard Specification for Glass Fiber Reinforced Gypsum Composites《玻璃纤维增强石膏成份的标准规范》.pdf ASTM C1355 C1355M-1996(2006) Standard Specification for Glass Fiber Reinforced Gypsum Composites《玻璃纤维增强石膏成份的标准规范》.pdf
  • ASTM C1355 C1355M-1996(2011) Standard Specification for Glass Fiber Reinforced Gypsum Composites 《玻璃纤维增强石膏复合材料的标准规格》.pdf ASTM C1355 C1355M-1996(2011) Standard Specification for Glass Fiber Reinforced Gypsum Composites 《玻璃纤维增强石膏复合材料的标准规格》.pdf
  • ASTM C1355 C1355M-1996(2015) Standard Specification for Glass Fiber Reinforced Gypsum Composites《玻璃纤维增强石膏基复合材料的标准规格》.pdf ASTM C1355 C1355M-1996(2015) Standard Specification for Glass Fiber Reinforced Gypsum Composites《玻璃纤维增强石膏基复合材料的标准规格》.pdf
  • 相关搜索

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

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