填空题

算法复杂度主要包括时间复杂度和 【2】 复杂度。

【参考答案】

空间
<上一题 目录 下一题>
热门 试题

单项选择题
若有以下程序: #include <iostream> using namespace std; class A public: A() A(int i) x1=i; void dispa0 cout<< x1= <<x1<< , ; private: int x1; ; class B: public A public: B() B(int i):A(i+10) x2=i; void dispb() dispa(); cout<< x2= <<x2<<endl; private: int x2; ; int main() B b(2); b.dispb(); return 0; 程序运行后的输出结果是( )。
A.x1=10,x2=2
B.x1=12,x2=10
C.x1=12,x2=2
D.x1=2,x2=2
单项选择题
有如下程序: #include <iostream> using namespace std; class Complex double re, im, public: Complex(double r, double i): re(r), im(i) double real() const return re; double image() const return im, Complex& operator +=(Complex a) re +=a.re; im +=a.im; return *this; ; ostream& operator << (ostream& s, const Complex& z) return s<<’(’<<z.real()<<’,’<<z.image()<<’)’; int main() Complex x(1,-2), y(2,3); cout << (x+=y) << endl; return 0; 执行这个程序的输出结果是( )。
A.(1,-2)
B.(2,3)
C.(3,5)
D.(3,1)
相关试题
  • 阅读下面程序: #include<iostream.h>...
  • 下列程序运行后的输出结果是 【15】 。...
  • 在MyClass类的定义中,对赋值运算符:进行...
  • 假设血int a=1,b=2;,则表达式(+...
  • 下列程序的输出结果为2,请将程序补充完整...