填空题
执行语句序列:
int x=10,&r=x;
cout<<x<<’.’<<r<<endl;
输出结果为______。
【参考答案】
10-10
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
对基类数据成员的初始化必须派生类的构造函数中的______处执行。
点击查看答案&解析
填空题
在下面的程序的横线处填上适当的语句,使该程序的输出为12。 #include<iostream.h> using namespace std; class Base public: int a,b; Base(int i)a=i; ; class Derived:public Base int a; public: Derived(int x):Base(x),b(x+1); void show() ______; 输出基类数据成员a的值 cout<<b<<endl; ; int main() Derived d(1); d.show(); return 0;
点击查看答案&解析
相关试题
下列关于类和对象的叙述中,错误的是()。
阅读下面程序: #include<iostream.h>...
下面程序的输出结果为( )。 #include...
下列函数的运行结果是( )。 #include...
下列程序将x、y和z按从小到大的顺序排列,...