[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$f33Cey_z_qJo792MyvfKhYtHCVwLd_wmC5F0eFAn3FL4":3},{"answer":4,"createTime":5,"id":6,"options":7,"origin":13,"question":17,"related":18,"source":28,"type":29},[],"2025-12-18 10:35:52",271806377,[8,9,10,11,12],"ABC","CBA","AAA","BBB","CCC",{"courseId":14,"courseImg":15,"courseName":16},"8336f75d6d4cb0ae106461502e8ea0e0","https:\u002F\u002Ftihai-oss-cloud.itihey.com\u002Fimg\u002F8d8e99875725bed83e7cb68c2de07f03.jpg","C++语言程序设计","What will be displayed by the following program?#include &lt;iostream&gt;using namespace std;class CC {public: virtual string toString( ) { return &quot;C&quot;; }};class BB: public CC { string toString( ) { return &quot;B&quot;; }};class AA: public BB { virtual string toString( ) { return &quot;A&quot;; }};void displayObject(CC p) { cout &lt;&lt; p.toString( );}int main( ) { AA a; BB b; CC c; displayObject(a); displayObject(b); displayObject(c); return 0;}",[19,30,39,48,58,67,76,85,91,100],{"answer":20,"createTime":5,"id":21,"options":22,"question":27,"source":28,"type":29},[],271806368,[23,24,25,26],"long R::operator[ ](const int index)","long &amp;operator[ ](const int index)","&amp;long operator[ ](const int index)","long operator&amp;[ ](const int index)","What is the correct signature for the overloaded subscript operator [ ] in class R","v1",0,{"answer":31,"createTime":5,"id":32,"options":33,"question":38,"source":28,"type":29},[],271806369,[34,35,36,37],"(1, -2)","(2, 3)","(3, 5)","(3, 1)","The output result after executing the following program is ( )#include &lt;iostream&gt;using namespace std;class complex {private: double re, im;public: complex (double r, double i) : re(r), im(i) { } double real ( ) const { return re; } double image ( ) const { return im; } complex &amp;operator += (complex a) { re += a.re; im += a.im; return *this; }};void disp(const complex &amp;z) { cout &lt;&lt; &quot;(&quot; &lt;&lt; z.real( ) &lt;&lt; &quot;, &quot; &lt;&lt; z.image( ) &lt;&lt; &quot;)&quot;;}int main ( ) { complex x(1, -2), y(2, 3); disp(x+=y); return 0;}",{"answer":40,"createTime":5,"id":41,"options":42,"question":47,"source":28,"type":29},[],271806370,[43,44,45,46],"x = 7","x = 8","x = 3","x = 4","The result of running the following program is ( ).#include &lt;iostream&gt;using namespace std;template &lt;class T&gt;class Num {private: T x;public: Num( ) { } Num(T x) { this-&gt;x = x; } Num&lt;T&gt;&amp; operator + (const Num&lt;T&gt;&amp; x2) { static Num&lt;T&gt; temp; temp.x = x + x2.x; return temp; } void disp( ) { cout &lt;&lt; &quot;x = &quot; &lt;&lt; x; }};int main ( ) { Num&lt;int&gt; A(3.8), B(4.8); A = A + B; A.disp( ); return 0;}",{"answer":49,"createTime":5,"id":50,"options":51,"question":57,"source":28,"type":29},[],271806371,[52,53,54,55,56],"int operator( )","R(int n)","friend R operator+(int r1, const R&amp; r2)","R operator+(const R&amp; r1)","friend R operator+(const R&amp; r2, int r1)","Suppose r is an object with class type R, in order to perform 4 + r, the R class header file must contain",{"answer":59,"createTime":5,"id":60,"options":61,"question":66,"source":28,"type":29},[],271806372,[62,63,64,65],"functions operator+( ) and operator*( ) contain two parameters","functions operator+( ) and operator*( ) contain two and one parameters, respectively","functions operator+( ) and operator*( ) contain one and two parameters, respectively","functions operator+( ) and operator*( ) contain one parameter","In the expression x + y * z, operator + is overloaded using a member function, and * is overloaded using a non-member function. Then, which of the following is correct",{"answer":68,"createTime":5,"id":69,"options":70,"question":75,"source":28,"type":29},[],271806373,[71,72,73,74],"Fraction operator+ (Fraction, Fraction)","Fraction operator- ( )","Fraction&amp; operator= (Fraction&amp;, Fraction)","Fraction&amp; operator+= (Fraction&amp;, Fraction)","The followings are prototypes of a binary operator function overloaded as a non-member function except for ( )",{"answer":77,"createTime":5,"id":78,"options":79,"question":84,"source":28,"type":29},[],271806374,[80,81,82,83],"default constructor","parameter constructor","a copy constructor","none of the above","To convert a fundamental type to a class type, we need to create a ( )",{"answer":86,"createTime":5,"id":87,"options":88,"question":90,"source":28,"type":29},[],271806375,[80,81,82,89],"conversion operator","To convert a class type into a fundamental type, we need a ( )",{"answer":92,"createTime":5,"id":93,"options":94,"question":99,"source":28,"type":29},[],271806376,[95,96,97,98],"The constructor of class AA is not called","The constructor of class AA is called and it displays &quot;i from AA is 0&quot;","The constructor of class AA is called and it displays &quot;i from AA is 40&quot;","The constructor of class AA is called and it displays &quot;i from AA is 60&quot;","Analyze the following program:#include &lt;iostream&gt;using namespace std;class AA {public: AA( ) { t( ); cout &lt;&lt; &quot;i from AA is &quot; &lt;&lt; i &lt;&lt; endl; } void t( ) { setI(20); } virtual void setI(int i) { this-&gt;i = 2*i; } int i;};class BB: public AA {public: virtual void setI(int i) { this-&gt;i = 3*i; }};int main( ) { AA *p = new BB( ); return 0;}",{"answer":101,"createTime":5,"id":6,"options":102,"question":17,"source":28,"type":29},[],[8,9,10,11,12]]