[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$fuMpeQ9V0w8M2YnkaBIVSHbkV35kx2F1FISEPdgSaJq0":3},{"answer":4,"createTime":5,"id":6,"options":7,"origin":12,"question":16,"related":17,"source":27,"type":28},[],"2025-12-18 10:35:52",271806372,[8,9,10,11],"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",{"courseId":13,"courseImg":14,"courseName":15},"8336f75d6d4cb0ae106461502e8ea0e0","https:\u002F\u002Ftihai-oss-cloud.itihey.com\u002Fimg\u002F8d8e99875725bed83e7cb68c2de07f03.jpg","C++语言程序设计","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",[18,29,38,47,57,60,69,78,84,93],{"answer":19,"createTime":5,"id":20,"options":21,"question":26,"source":27,"type":28},[],271806368,[22,23,24,25],"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":30,"createTime":5,"id":31,"options":32,"question":37,"source":27,"type":28},[],271806369,[33,34,35,36],"(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":39,"createTime":5,"id":40,"options":41,"question":46,"source":27,"type":28},[],271806370,[42,43,44,45],"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":48,"createTime":5,"id":49,"options":50,"question":56,"source":27,"type":28},[],271806371,[51,52,53,54,55],"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":58,"createTime":5,"id":6,"options":59,"question":16,"source":27,"type":28},[],[8,9,10,11],{"answer":61,"createTime":5,"id":62,"options":63,"question":68,"source":27,"type":28},[],271806373,[64,65,66,67],"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":70,"createTime":5,"id":71,"options":72,"question":77,"source":27,"type":28},[],271806374,[73,74,75,76],"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":79,"createTime":5,"id":80,"options":81,"question":83,"source":27,"type":28},[],271806375,[73,74,75,82],"conversion operator","To convert a class type into a fundamental type, we need a ( )",{"answer":85,"createTime":5,"id":86,"options":87,"question":92,"source":27,"type":28},[],271806376,[88,89,90,91],"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":94,"createTime":5,"id":95,"options":96,"question":102,"source":27,"type":28},[],271806377,[97,98,99,100,101],"ABC","CBA","AAA","BBB","CCC","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;}"]