填空题
下面程序的执行结果是______。
#include<iostream.h>
#include<iomanip.h>
using namespace std;
void main()
cout<<setfill(’x’)<<setw(10);
cout<<"Hello"<<endl;
【参考答案】
xxxxxHello
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
有以下程序: #include<iostream> using namespace std; class Base public: Base() x=0; int x; ; class Derivedl:virtual public Base public: Derivedl() x=10; ; class Derived2:virtual public Base public: Derived2() x=20; ; class Derived:public Derivedl,protected Derived2 ; int main() Derived obj; cout<<obj.x<<endl; return 0; 该程序运行后的输出结果是______。
点击查看答案&解析
填空题
Staff类含有血型数据成员ID,两个Staff对象相等是指它们的ID相同。下面的函数重载了运算符==,它用来判断两个Staff对象是否相等,相等时返回true,否则返回false。 请将横线处缺失部分补充完整。 bool Staff::Staff==(const Staff &s) return (______);
点击查看答案&解析
相关试题
下列关于虚函数的描述中,正确的是
有如下函数模板的定义: template <clas...
对于语句cin>>x;中的各个组成部分,下列...
对于长度为n的线性表,在最坏情况下,下列...
有以下类定义 class MyClass public: ...