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

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

1、计算机二级(C+)上机考试 9 及答案解析(总分:-3.00,做题时间:90 分钟)1.改错题 使用 VC6 打开考生文件夹下的工程 test15_1,此工程包含一个源程序文件 test15_1.cpp,但该程序运行有问题,请改正程序中的错误,使该程序的输出结果如下: My object has member 7 源程序文件 test15_1.cpp 清单如下: #include class MyClass public: MyClass(int mem)member=mem; MyClass() int GetAge() const return member; private: int m

2、ember; ; /* found */ void main() int mem=7; /* found */ MyClass myObj=MakeObject(mem); 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是取出第一个指针指向的内容。

展开阅读全文
相关资源
猜你喜欢
  • ISO 9327-4-1999 Steel forgings and rolled or forged bars for pressure purposes - Technical delivery conditions - Part 4 Weldable fine grain steels with high pro.pdf ISO 9327-4-1999 Steel forgings and rolled or forged bars for pressure purposes - Technical delivery conditions - Part 4 Weldable fine grain steels with high pro.pdf
  • ISO 9327-5-1999 Steel forgings and rolled or forged bars for pressure purposes - Technical delivery conditions - Part 5 Stainless steels《压力用途的钢锻件和轧制或锻造的棒材 交货技术条.pdf ISO 9327-5-1999 Steel forgings and rolled or forged bars for pressure purposes - Technical delivery conditions - Part 5 Stainless steels《压力用途的钢锻件和轧制或锻造的棒材 交货技术条.pdf
  • ISO 9329-1-1989 Seamless steel tubes for pressure purposes technical delivery conditions part 1 unalloyed steels with specified room temperature properties《压力用途.pdf ISO 9329-1-1989 Seamless steel tubes for pressure purposes technical delivery conditions part 1 unalloyed steels with specified room temperature properties《压力用途.pdf
  • ISO 9329-2-1997 Seamless steel tubes for pressure purposes - Technical delivery conditions - Part 2 Unalloyed and alloyed steels with specified elevated tempera.pdf ISO 9329-2-1997 Seamless steel tubes for pressure purposes - Technical delivery conditions - Part 2 Unalloyed and alloyed steels with specified elevated tempera.pdf
  • ISO 9329-3-1997 Seamless steel tubes for pressure purposes - Technical delivery conditions - Part 3 Unalloyed and alloyed steels with specified low temperature .pdf ISO 9329-3-1997 Seamless steel tubes for pressure purposes - Technical delivery conditions - Part 3 Unalloyed and alloyed steels with specified low temperature .pdf
  • ISO 9329-4-1997 Seamless steel tubes for pressure purposes - Technical delivery conditions - Part 4 Austenitic stainless steels《压力用途的无缝钢管 交货技术条件 第4部分 奥氏体不锈钢》.pdf ISO 9329-4-1997 Seamless steel tubes for pressure purposes - Technical delivery conditions - Part 4 Austenitic stainless steels《压力用途的无缝钢管 交货技术条件 第4部分 奥氏体不锈钢》.pdf
  • ISO 9330-1-1990 Welded steel tubes for pressure purposes technical delivery conditions part 1 unalloyed steel tubes with specified room temperatures properties《.pdf ISO 9330-1-1990 Welded steel tubes for pressure purposes technical delivery conditions part 1 unalloyed steel tubes with specified room temperatures properties《.pdf
  • ISO 9330-2-1997 Welded steel tubes for pressure purposes - Technical delivery conditions - Part 2 Electric resistance and induction welded unalloyed and alloyed.pdf ISO 9330-2-1997 Welded steel tubes for pressure purposes - Technical delivery conditions - Part 2 Electric resistance and induction welded unalloyed and alloyed.pdf
  • ISO 9330-3-1997 Welded steel tubes for pressure purposes - Technical delivery conditions - Part 3 Electric resistance and induction welded unalloyed and alloyed.pdf ISO 9330-3-1997 Welded steel tubes for pressure purposes - Technical delivery conditions - Part 3 Electric resistance and induction welded unalloyed and alloyed.pdf
  • 相关搜索

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

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