填空题
以下程序的输出结果是【 】。 #include<iostream.h> void main( ) { int a=0; a+ =(a=8); cout < < a; =
【参考答案】
P
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
C++语言程序的注释可以出现在程序中的任何地方,一个注释以【 】作为开始和结束的标记。
点击查看答案&解析
填空题
下列程序的输出结果是【 】。#include<iostream>using namespace std;class base{public:int n;base (int x){n=x;}virtual void set (int m){n=m;cout<<n<<;}};class deriveA:public base{public:dericeA(int x):base(x){}void set(int m){n+m;cout<<n<<’’’’;}};Class deriveB:public base{public:deriveB(int x):base(x){}void set(int m){n+m;cout<<n<<’’’’;}};int main(){deriveA d1(1);deriveB.d2(3);base*pbase;pbase=&d1;pbase->set(1);pbase=&d2;pbase->set(2);return 0;}
点击查看答案&解析
相关试题
在E—R图中,用来表示实体之间联系的图形是
有如下头文件:int fl();static int ...
C++语言对C语言做了很多改进,C++语言...
不能作为重载函数的调用的依据是( )。
C++语言函数中不能由系统自动生成的是(...