整专业资料
微信QQ群
考生网QQ群

群号:517231281

扫码加群
点击二维码加群

考生网微信公众号

微信号:zikaosw

课程试听
最新资讯

手机端访问

1、直接输入www.zikaosw.cn
2、扫描左侧二维码

登录 | 注册
登录/注册后,可享受
  • 课程免费试听
  • 试做在线题库
  • 学习提升指导
  • [单选题] C++对C语言作了很多改进,即从面向过程变成为面向对象的主要原因是

    • A、增加了一些新的运算符
    • B、允许函数重载,并允许设置缺省参数
    • C、规定函数说明符必须用原型
    • D、引进了类和对象的概念

     纠错    

  • 助考班推荐

您可能感兴趣的试题

  • 1、[单选题]假定一个二维数组的定义语句为”int a[3][4]={{3,4},{2,8,6}};”,则元素a[1][2]的值为().

    • A、2
    • B、4
    • C、6
    • D、8
  • 2、[主观题]在下面程序中的横线处填上适当内容,使程序完整。#includeclassvehicle{protected:intsize;intspeed;public:voidsetSpeed(ints){speed=s;}①___getSpeedLevel{returnspeed/10;}};classcar:pubicvehicle{public:intgetSpeedLeve{returnspeed/5;}};classtruck:publicvehicle{public:intgetSpeedLevel{returnspeed/15;}};intmaxSpeedLevel(vehicle②___,vehicle③___){if(v1.getSpeedLevel>v2.getSpeedLevel)return1;elsereturn2;}voidmain{truckt;carc;t.setSpeed;c.setSpeed;cout

  • 3、[主观题]写出下面程序的输出结果。#includeclassFunArray{int*pa;//指向一个数组空间intsize;//数组元素个数public:FunArray(inta[],intthesize):pa(a),size(thesize){}intSize{returnsize;}intoperator[](intindex){returnpa[index-1];}};voidmain{ints[]={3,7,2,1,5,4};FunArrayma(s,sizeof(s)/sizeof(int));ma[3]=9;for(inti=1;i

  • 4、[主观题]C++语言的类是由数据和对数据进行操作的函数组成,它们分别叫做类的___和类的___。

  • 5、[主观题]分析下面程序的设计思想及输出结果:classnumber{private:intval;public:number(inti){val=i;}operatorint;};number::operatorint{retumval;}#include#include″number.h″classnum:publicnumber{public:num(inti):number(i){}};voidmain{numn;inti=n;cout

Copyright © 2010 - 2023 湖南求实创新教育科技有限公司 All Right Reserved.

温馨提示:如您需要的资料本网暂时没有,请于工作日08:00-18:00,点击这里,联系客服及时补充资料。