【计算机类职业资格】二级C++笔试-342及答案解析.doc

上传人:李朗 文档编号:1324581 上传时间:2019-10-17 格式:DOC 页数:23 大小:69KB
下载 相关 举报
【计算机类职业资格】二级C++笔试-342及答案解析.doc_第1页
第1页 / 共23页
【计算机类职业资格】二级C++笔试-342及答案解析.doc_第2页
第2页 / 共23页
【计算机类职业资格】二级C++笔试-342及答案解析.doc_第3页
第3页 / 共23页
【计算机类职业资格】二级C++笔试-342及答案解析.doc_第4页
第4页 / 共23页
【计算机类职业资格】二级C++笔试-342及答案解析.doc_第5页
第5页 / 共23页
点击查看更多>>
资源描述

1、二级 C+笔试-342 及答案解析(总分:100.00,做题时间:90 分钟)一、选择题(总题数:35,分数:70.00)1.在下面的类定义中,错误的语句是( )。class Samplepublic:Sample(int val); /Sample(); /private:int a=2.5; /Sample(); /;(分数:2.00)A.B.C.D.2.下列关于 getline()函数的描述中,不正确的是( )。(分数:2.00)A.getline()函数是用来从键盘上读取字符串的B.getline()函数读取字符串长度是受限制的C.getline()函数读取字符串时,遇到终止符时就停止

2、D.getline()函数中所使用的终止符只能是换行符3.下述有关构造函数的说法,不正确的是( )。(分数:2.00)A.构造函数名字和类的名字一样B.构造函数在说明类变量时自动执行C.构造函数无任何函数类型D.构造函数有且只有一个4.下列选项中不属于软件生命周期定义时期任务的是( )。(分数:2.00)A.可行性分析B.概要设计C.规格说明D.需求分析5.下列叙述中正确的是( )。(分数:2.00)A.线性表是线性结构B.栈与队列是非线性结构C.线性链表是非线性结构D.二叉树是线性结构6.定义如下变量:char one_char;,则语句 coutone_char;显示结果相当于 C语言中的

3、 )语句。(分数:2.00)A.printf(one_char);B.prinff(“%c“,one_char);C.scanf(one_char);D.scanf(“%c“,j+;case 6:i+;j+;break;default:i+;j+;couti“,“jendl;)(分数:2.00)填空项 1:_50.以下程序的执行结果是 【15】 。#includeiostream#define PI_3.14159const int R=10;void main()double a,b;ac2*R*PI;b=R*R*PI;cout“a=“a“,“b=“bendl;“(分数:2.00)填空项

4、1:_二级 C+笔试-342 答案解析(总分:100.00,做题时间:90 分钟)一、选择题(总题数:35,分数:70.00)1.在下面的类定义中,错误的语句是( )。class Samplepublic:Sample(int val); /Sample(); /private:int a=2.5; /Sample(); /;(分数:2.00)A.B.C. D.解析:2.下列关于 getline()函数的描述中,不正确的是( )。(分数:2.00)A.getline()函数是用来从键盘上读取字符串的B.getline()函数读取字符串长度是受限制的C.getline()函数读取字符串时,遇到终

5、止符时就停止D.getline()函数中所使用的终止符只能是换行符 解析:3.下述有关构造函数的说法,不正确的是( )。(分数:2.00)A.构造函数名字和类的名字一样B.构造函数在说明类变量时自动执行C.构造函数无任何函数类型D.构造函数有且只有一个 解析:4.下列选项中不属于软件生命周期定义时期任务的是( )。(分数:2.00)A.可行性分析B.概要设计 C.规格说明D.需求分析解析:5.下列叙述中正确的是( )。(分数:2.00)A.线性表是线性结构 B.栈与队列是非线性结构C.线性链表是非线性结构D.二叉树是线性结构解析:6.定义如下变量:char one_char;,则语句 cout

6、one_char;显示结果相当于 C语言中的( )语句。(分数:2.00)A.printf(one_char);B.prinff(“%c“,one_char); C.scanf(one_char);D.scanf(“%c“,j+;case 6:i+;j+;break;default:i+;j+;couti“,“jendl;)(分数:2.00)填空项 1:_ (正确答案:1,2)解析:50.以下程序的执行结果是 【15】 。#includeiostream#define PI_3.14159const int R=10;void main()double a,b;ac2*R*PI;b=R*R*PI;cout“a=“a“,“b=“bendl;“(分数:2.00)填空项 1:_ (正确答案:a=62.8318,b=314.159)解析:

展开阅读全文
相关资源
猜你喜欢
  • ISO 886-1973 Aluminium and aluminium alloys Determination of manganese Photometric method (Manganese content between 0 005 and 1 5 %)《铝和铝合金 锰含量的测定 光度法(锰含量为0 005.pdf ISO 886-1973 Aluminium and aluminium alloys Determination of manganese Photometric method (Manganese content between 0 005 and 1 5 %)《铝和铝合金 锰含量的测定 光度法(锰含量为0 005.pdf
  • ISO 8862-1987 Air-conditioning and ventilation of machinery control-rooms on board ships Design conditions and basis of calculations《船舶机舱的空气调节和通风 设计条件和计算基准》.pdf ISO 8862-1987 Air-conditioning and ventilation of machinery control-rooms on board ships Design conditions and basis of calculations《船舶机舱的空气调节和通风 设计条件和计算基准》.pdf
  • ISO 8863-1987 Ship-s wheelhouse windows Heating by hot air of glass panes《船舶驾驶室窗 用热空气加热窗格玻璃》.pdf ISO 8863-1987 Ship-s wheelhouse windows Heating by hot air of glass panes《船舶驾驶室窗 用热空气加热窗格玻璃》.pdf
  • ISO 8864-1987 Air-conditioning and ventilation of wheelhouse on board ships Design conditions and basis of calculations《船舶驾驶室的空气调节和通风 设计条件和计算基准》.pdf ISO 8864-1987 Air-conditioning and ventilation of wheelhouse on board ships Design conditions and basis of calculations《船舶驾驶室的空气调节和通风 设计条件和计算基准》.pdf
  • ISO 8866-1991 Rotary core diamond drilling equipment system C《回转取心金刚石钻探设备 系列C》.pdf ISO 8866-1991 Rotary core diamond drilling equipment system C《回转取心金刚石钻探设备 系列C》.pdf
  • ISO 887 CORR 1-2006 Plain washers for metric bolts screws and nuts for general purposes - General plan Technical Corrigendum 1《通用米制螺栓、螺钉和螺母用普通垫圈 一般示意图 技术勘误1》.pdf ISO 887 CORR 1-2006 Plain washers for metric bolts screws and nuts for general purposes - General plan Technical Corrigendum 1《通用米制螺栓、螺钉和螺母用普通垫圈 一般示意图 技术勘误1》.pdf
  • ISO 8871-1-2003 Elastomeric parts for parenterals and for devices for pharmaceutical use - Part 1 Extractables in aqueous autoclavates《非肠道和制药设备用弹性件 第1部分 含水autoc.pdf ISO 8871-1-2003 Elastomeric parts for parenterals and for devices for pharmaceutical use - Part 1 Extractables in aqueous autoclavates《非肠道和制药设备用弹性件 第1部分 含水autoc.pdf
  • ISO 8871-2-2003 Elastomeric parts for parenterals and for devices for pharmaceutical use - Part 2 Identification and characterization《非肠道及制药设备用弹性件 第2部分 鉴别和表征》.pdf ISO 8871-2-2003 Elastomeric parts for parenterals and for devices for pharmaceutical use - Part 2 Identification and characterization《非肠道及制药设备用弹性件 第2部分 鉴别和表征》.pdf
  • ISO 8871-3-2003 Elastomeric parts for parenterals and for devices for pharmaceutical use - Part 3 Determination of released-particle count《非肠道及制药设备用弹性件 第3部分 释放粒.pdf ISO 8871-3-2003 Elastomeric parts for parenterals and for devices for pharmaceutical use - Part 3 Determination of released-particle count《非肠道及制药设备用弹性件 第3部分 释放粒.pdf
  • 相关搜索

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

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