填空题

在面向对象方法中,类的实例称为 【1】 。

【参考答案】

对象
<上一题 目录 下一题>
热门 试题

单项选择题
有以下程序: #include<iostream> using namespace std; class R public: R(int r1,int r2) R1=r1; R2=r2; void print(); void print0const; private: int R1,R2; ; void R::print() cout<<R1<< , <<R2<<endl; void R::print() const cout<<Rl<< , <<R2<<endl; int main() R a(5,4); const R b(20,52); b.print(); return 0; 执行后的输出结果是( )。
A.5,4
B.20,52
C.0,0
D.4,5
单项选择题
若有如下程序: #include<iostream> using namespace std; int s=0; class sample static int n; pubic: sample(int i) n=i; static void add() S+=n; ; int sample::n=O; int main() sample a(2),b(5); sample::add(); cout<<s<<endl; return 0; 程序运行后的输出结果是( )。
A.2
B.5
C.7
D.3
相关试题
  • 当循环队列非空且队尾指针等于队头指针时,...
  • 下面程序的功能是:将字符数组a中下标值为...
  • 将x+y*z中的“+”用成员函数重载,“*...
  • 以下程序的执行结果是 【13】 。 #in...
  • 【8】 是一种特殊的成员函数,它主要用来...