填空题

C++语句constchar *constp=”hello”;,所定义的指针p和它所指的内容都不能被______。

【参考答案】

改变。
<上一题 目录 下一题>
热门 试题

填空题
在MyClass类的定义中,对赋值运算符=进行重载。请将横线处缺失的部分补充完整。 ______MyClass::operator=(const MyClass&rhs) if(this==&rhs)return*this; value=rhs.value; return*this;
填空题
有以下程序: #include<iostream> using namespace std; class Base public: Base() K=0; int x; ; class Derivedl:virtual public Base public: Derivedl() x=10; ; class Derived2:virtua1 public Base public: Derived2() x=20; ; class Derived;public Derivedl,protected Derived2 ; int main() Derived obj; cout<<obj.x<<endl; return 0; 该程序运行后的输出结果是______。
相关试题
  • 下面有关重载函数的描述中正确的是( )。
  • 树是结点的集合,它的根结点的数目是( )。
  • 有如下类定义: class Foo public: Fo...
  • 在数据库设计中,将E-R图转换为关系模式的...
  • 结构化程序设计的3种基本结构是( )。