[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$feH7vr91BIw0fhHZg3FUr9-mFeD4FbdijPJ0VV800VsY":3},{"id":4,"source":5,"question":6,"options":7,"answer":8,"related":9,"type":114,"origin":115,"createTime":122},146216737,"v1","若存在类A,且有A*型指针p,那么语句p->Func( );编译通过,说明类A一定有匹配的函数Func",[],[],[10,23,33,43,53,63,74,84,94,104],{"id":11,"source":5,"question":12,"options":13,"answer":18,"related":19,"type":20,"origin":21,"createTime":22},146216651,"假设存在下面代码,选项中说法正确的是: \u003Cimg src=\"https:\u002F\u002Fp.ananas.chaoxing.com\u002Fstar3\u002Forigin\u002Fb031fc2ea0dc05f1c13afa3483051b58.png\">",[14,15,16,17],"该程序的输出结果为: 6 6 6 6 3.14","该程序的输出结果为: 0 0 0 6 3.14","该程序的输出结果为 0 0 0 6 0","在(1)处增加语句Shape& rc=cir; rc.Draw( ); 则该程序的输出结果为: 0 0 0 6 3.14 a circle",[],[],0,null,"2024-05-26T17:15:32+08:00",{"id":24,"source":5,"question":25,"options":26,"answer":31,"related":32,"type":20,"origin":21,"createTime":22},146216653,"下列说法中正确的是",[27,28,29,30],"静态编联也称为晚绑定、静态绑定","静态编联是运行期间决定具体调用哪个函数体","动态编联是编译期间就决定了程序运行时将具体调用哪个函数体","动态编联通常是以虚机制来实现的",[],[],{"id":34,"source":5,"question":35,"options":36,"answer":41,"related":42,"type":20,"origin":21,"createTime":22},146216655,"假设存在下面代码,选项中说法不正确的是:class A {public: virtual void F( ){ } virtual void F(int n){ } virtual A* G( ){ } void H( ){ }private: void K( ){ } int data;};class B:public A {public: virtual void BF( ){ } \u002F\u002F (1) virtual void F(int n) const{ } \u002F\u002F (2) B* G( ) { } \u002F\u002F (3) virtual void H( ) { } \u002F\u002F (4)}",[37,38,39,40],"(1)为newdefine的函数","(2)overwrite了基类的函数F","(3)override了基类的函数G","(4)override了基类的函数H",[],[],{"id":44,"source":5,"question":45,"options":46,"answer":51,"related":52,"type":20,"origin":21,"createTime":22},146216657,"假设存在下面代码,选项中说法最合理的是:class A {public: virtual void F( ){ } virtual void F(int n){ } virtual A* G( ){ } void H( ){ }private: virtual void K( ){ } int data;};class B:public A {public: virtual ~B( ){ } virtual void BF( ){ } virtual void F(int n) const{ } B* G( ) { } virtual void H( ) { }}",[47,48,49,50],"类A有5个虚函数: A::~A( ) A::F( ) A::F(int) A::G( ) A::K( )","类B有4个虚函数: B::~B( ) B::BF( ) B::F(int) const B::H( )","类B有6个虚函数: B::G( ) A::K( ) B::~B( ) B::BF( ) B::F(int) const B::H( )","类B有8个虚函数: A::F( ) A::F(int) B::G( ) A::K( ) B::~B( ) B::BF( ) B::F(int) const B::H( )",[],[],{"id":54,"source":5,"question":55,"options":56,"answer":61,"related":62,"type":20,"origin":21,"createTime":22},146216659,"假设存在下面代码,选项中说法正确的是:class A { \u002F* 略 *\u002F };class B:public A { \u002F* 略 *\u002F };B* pb;\u002F* 其它代码,略 *\u002FA* pobj=pb;A& robj=*pb;A aobj=*pb",[57,58,59,60],"pobj的静态类型是A*,动态类型是B","robj的静态类型是A&,动态类型是B","aobj的静态类型是A,动态类型是不确定的","以上都不对",[],[],{"id":64,"source":5,"question":65,"options":66,"answer":72,"related":73,"type":20,"origin":21,"createTime":22},146216661,"假设存在下面代码,选项中说法正确的是:class A {public: virtual ~A( ) { } virtual void F( ){ } virtual void G( ){ } void H( ){ }};class B:public A {public: virtual void E( ){ } virtual void F( ){ } virtual void H( ){ }};A * p1 = new A;A * p2 = new B",[67,68,69,70,71,60],"类A的虚函数表为: &A::~A( ) &A::F( ) &A::G( ) &A::H( )","类B的虚函数表为: &B::F( ) &A::G( ) &B::E( ) &B::H( )","类B的虚函数表为: &A::G( ) &B::~B( ) &B::E( ) &B::F( ) &B::H( )","p1->E( )是语法错误,编译失败 p2->E( )是动态编联,执行的是B::E( )","p1->H( )是静态编联,执行的是A::H( ) p2->H( )是动态编联,执行的是B::H( )",[],[],{"id":75,"source":5,"question":76,"options":77,"answer":82,"related":83,"type":20,"origin":21,"createTime":22},146216663,"阅读下面代码,正确的输出结果是:\u003Cimg src=\"https:\u002F\u002Fp.ananas.chaoxing.com\u002Fstar3\u002Forigin\u002F1421a513906bcc3eee38a8c647df995e.png\">",[78,79,80,81],"Base::f(float) 3.14 Derived::f(float) 3.14 Base::g(float) 3.14 Derived::g(int) 3.14 Base::h(float) 3.14 Derived::h(float) 3.14","Derived::f(float) 3.14 Derived::f(float) 3.14 Derived::g(int) 3 Derived::g(int) 3 Base::h(float) 3.14 Derived::h(float) 3.14","Derived::f(float) 3.14 Derived::f(float) 3.14 Base::g(float) 3.14 Derived::g(int) 3 Derived::h(float) 3.14 Derived::h(float) 3.14","Derived::f(float) 3.14 Derived::f(float) 3.14 Base::g(float) 3.14 Derived::g(int) 3 Base::h(float) 3.14 Derived::h(float) 3.14",[],[],{"id":85,"source":5,"question":86,"options":87,"answer":92,"related":93,"type":20,"origin":21,"createTime":22},146216665,"阅读下面代码,选项中说法最合理的是:\u003Cimg src=\"https:\u002F\u002Fp.ananas.chaoxing.com\u002Fstar3\u002Forigin\u002F573d98c86bdd43cbd53b5369757352fd.png\">",[88,89,90,91],"程序不存在问题,输出结果为: call A::~A()","程序不存在问题,输出结果为: call B::~B() call A::~A()","程序存在问题,在子类B中自定义深拷贝和深赋值函数,就能避免该问题","程序存在问题,应该将父类A中的析构函数声明为virtual",[],[],{"id":95,"source":5,"question":96,"options":97,"answer":102,"related":103,"type":20,"origin":21,"createTime":22},146216667,"要编写一个程序,能够绘制指定数目的图形,图形包括圆和矩形,将来可能增加三角形、菱形等新的图形,现设计了函数drawShapes,声明如下,则选项中最合理的是:void drawShapes(Shape* list[],int n)",[98,99,100,101],"将函数drawShapes去掉,分别定义函数drawCircle和drawRectangle,并在main函数中,根据用户输入的图形类型和数目,使用if\u002Felse针对不同图形分别调用这两个函数进行绘制","将函数drawShapes的形参列表改为空,在函数实现中,直接根据用户输入的图形类型和数目,使用switch\u002Fcase针对不同图形分别绘制","函数drawShapes的原型保持不变,在函数实现中,判断list中Shape*指针所指向图形的真实类型,并使用switch\u002Fcase针对不同图形分别绘制","函数drawShapes的原型保持不变,定义类Shape及虚函数draw( ),并在子类Circle和Rectangle中override,然后在函数drawShapes的实现中,遍历list,通过list[i]->draw( )的方式,对指定数目的图形进行绘制",[],[],{"id":105,"source":5,"question":106,"options":107,"answer":112,"related":113,"type":20,"origin":21,"createTime":22},146216669,"阅读下面代码,正确的输出结果是:\u003Cimg src=\"https:\u002F\u002Fp.ananas.chaoxing.com\u002Fstar3\u002Forigin\u002F45142469c23da28fa8bf36bcc28ad0da.png\">",[108,109,110,111],"Derived::vf( ) Derived::vf( ) Derived::vf( ) Base::vg( ) Derived::vf( ) Base::nvh( ) Base::vf( ) Derived::nvh( ) Derived::vf( ) Derived::vf( ) Derived::vf( )","Base::vf( ) Derived::vf( ) Derived::vf( ) Base::vg( ) Derived::vf( ) Derived::nvh( ) Derived::vf( ) Derived::nvh( ) Derived::vf( ) Derived::vf( ) Base::vf( )","Base::vf( ) Derived::vf( ) Derived::vf( ) Base::vg( ) Derived::vf( ) Base::nvh( ) Derived::vf( ) Base::nvh( ) Derived::vf( ) Derived::vf( ) Base::vf( )","Base::vf( ) Derived::vf( ) Derived::vf( ) Base::vg( ) Derived::vf( ) Base::nvh( ) Derived::vf( ) Base::nvh( ) Derived::vf( ) Base::vf( ) Derived::vf( )",[],[],3,{"courseName":116,"courseImg":117,"workName":118,"workId":119,"count":120,"courseId":121},"面向对象程序设计","https:\u002F\u002Ftihai-oss-cloud.itihey.com\u002Fimg\u002F4c7af9182a07a7f3cde94a24ba29ab4c.jpg","客观18-19","work_35165571",52,"d546a0bff31cef9b5b42bef709a2e858","2024-05-26T17:15:33+08:00"]