【计算机类职业资格】国家计算机二级(C++)87及答案解析.doc

上传人:ownview251 文档编号:1335188 上传时间:2019-10-17 格式:DOC 页数:13 大小:81KB
下载 相关 举报
【计算机类职业资格】国家计算机二级(C++)87及答案解析.doc_第1页
第1页 / 共13页
【计算机类职业资格】国家计算机二级(C++)87及答案解析.doc_第2页
第2页 / 共13页
【计算机类职业资格】国家计算机二级(C++)87及答案解析.doc_第3页
第3页 / 共13页
【计算机类职业资格】国家计算机二级(C++)87及答案解析.doc_第4页
第4页 / 共13页
【计算机类职业资格】国家计算机二级(C++)87及答案解析.doc_第5页
第5页 / 共13页
点击查看更多>>
资源描述

1、国家计算机二级(C+)87 及答案解析(总分:460.00,做题时间:120 分钟)一、选择题(每小题 2 分,共 70 分) 下列各(总题数:35,分数:70.00)1.有如下程序 #include #include using namespace std; int main() coutB.+ - + -C. = B.+ - + -C. = =1 或 0 , i)解析:本程序有两重 for 循环,外层 for 循环控制输出数据的行数,故第 -|_|-空填“=1”或“0”,内层循环控制每行输出的个数。在内层 for 循环中,用语句“x=(j-1)*4+ -|_|-;”控制输出方阵中的具体数据

2、 由于这些数据与其所在的行、列(j,i)有关系x=(j-1)*4+i,故此空填 i。44.用以下语句调用库函数 malloc,使字符指针 st 指向具有 11 个字节的动态存储空间,请填空。 st=(char*) 1; (分数:30.00)填空项 1:_ (正确答案:malloc(11)或 malloc(sizeof(char) * 11 ))解析:malloc 函数的参数可以是一个具体的常数,也可以是一个表达式。在本题中, 可以是 malloc(11),也可以借助于 sizeof 运算符来表示。 45.构造函数是和 1 同名的函数。(分数:30.00)填空项 1:_ (正确答案:类)解析:

3、C+语言中的构造函数就是在类中定义的和类名一样的函数。46.语句 cout /n还可表示为 1。(分数:30.00)填空项 1:_ (正确答案:cout end1;)解析:“/n”表示换行,end1 也可表示换行。end1 和“/n”可以通用。47.将一个函数声明为一个类的友元函数必须使用关键字 1。(分数:30.00)填空项 1:_ (正确答案:friend)解析:本题考核友元函数。定义友元函数的方式是在类定义中用关键字 friend 说明该函数,其格式为:friend类型友元函数名(参数表);48.在 c+语言的面向对象程序设计框架中, 1 是程序的基本组成单元。(分数:30.00)填空项 1:_ (正确答案:类)解析:C+语言面向对象程序设计的基本组成单元是 class,面向过程的程序设计的 基本组成单元是函数。

展开阅读全文
相关资源
猜你喜欢
  • DIN EN 129100 A1-1996 Sectional specification Wirewound surface mounting inductors German version EN 129100 1993 A1 1995《分规范 线圈表面安装的电感器》.pdf DIN EN 129100 A1-1996 Sectional specification Wirewound surface mounting inductors German version EN 129100 1993 A1 1995《分规范 线圈表面安装的电感器》.pdf
  • DIN EN 129100-1994 Sectional specification wirewound surface mounting inductors German version EN 129100 1993《分规范 线绕表面安装电感线圈》.pdf DIN EN 129100-1994 Sectional specification wirewound surface mounting inductors German version EN 129100 1993《分规范 线绕表面安装电感线圈》.pdf
  • DIN EN 129101 A1-1995 Blank detail specification Wirewound surface mounting inductors of assessed quality - Assessment level E German version EN 129101 A1 1994《空白详细规范 评估质量线绕面安装的电感器.pdf DIN EN 129101 A1-1995 Blank detail specification Wirewound surface mounting inductors of assessed quality - Assessment level E German version EN 129101 A1 1994《空白详细规范 评估质量线绕面安装的电感器.pdf
  • DIN EN 129101 A2-1996 Blank detail specification Wirewound surface mounting inductors of assessed quality - Assessment level E German version EN 129101 1993 A2 1995《空白详细规范 经质量评定的线圈.pdf DIN EN 129101 A2-1996 Blank detail specification Wirewound surface mounting inductors of assessed quality - Assessment level E German version EN 129101 1993 A2 1995《空白详细规范 经质量评定的线圈.pdf
  • DIN EN 129101-1994 Blank detail specification wirewound surface mounting inductors of assessed quality assessment level E German version EN 129101 1993《空白详细规范 经质量评定的线绕表面安装电感线圈 评定等级.pdf DIN EN 129101-1994 Blank detail specification wirewound surface mounting inductors of assessed quality assessment level E German version EN 129101 1993《空白详细规范 经质量评定的线绕表面安装电感线圈 评定等级.pdf
  • DIN EN 129102 A1-1996 Blank detail specification Wirewound surface mounting inductors of assessed quality - Assessment level P German version EN 129102 1994 A1 1995《空白详细规范 经质量评定的线圈.pdf DIN EN 129102 A1-1996 Blank detail specification Wirewound surface mounting inductors of assessed quality - Assessment level P German version EN 129102 1994 A1 1995《空白详细规范 经质量评定的线圈.pdf
  • DIN EN 129102-1995 Blank detail specification Wirewound surface mounting inductors of assessed quality - Assessment level P German version EN 129102 1994《空白详细规范 经质量评定的线绕表面安装电感线圈 评定.pdf DIN EN 129102-1995 Blank detail specification Wirewound surface mounting inductors of assessed quality - Assessment level P German version EN 129102 1994《空白详细规范 经质量评定的线绕表面安装电感线圈 评定.pdf
  • DIN EN 129200 A1-1996 Sectional specification Fixed inductors with ceramic or ferrite core wound with copper wire for RF circuits German version EN 129200 1994 A1 1995《分规范 射频(RF)电路.pdf DIN EN 129200 A1-1996 Sectional specification Fixed inductors with ceramic or ferrite core wound with copper wire for RF circuits German version EN 129200 1994 A1 1995《分规范 射频(RF)电路.pdf
  • DIN EN 129200-1995 Sectional specification Fixed inductors with ceramic or ferrite core wound with copper wire for HF circuits German version EN 129200 1994《分规范 HF 电路用带陶瓷或铁心的线绕线圈 》.pdf DIN EN 129200-1995 Sectional specification Fixed inductors with ceramic or ferrite core wound with copper wire for HF circuits German version EN 129200 1994《分规范 HF 电路用带陶瓷或铁心的线绕线圈 》.pdf
  • 相关搜索

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

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