单项选择题
有如下程序:
#include<iostream.h>
using namespace std;
class Demo
public:
Demo() cont<<"default constructor\n";
Demo(const Demo &x) cont<<"copy constructor\n";
;
Demo userCode(Demo b)Demo c(b);return c;
int main()
Demo a,d;
cout<<"calling userCode()\n";
d=userCode(
A.;
&n
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
若有如下程序: #include<iostream> using namespaces std; int s=0; class sample static int n; public: sample(int i) n=i; static void add() s+=n; ); int sample::s=0; int main() sample a(2),b(5); sample::add(); cout<<s<<endl; return 0; 程序运行后的输出结果是
A.2
B.5
C.7
D.3
点击查看答案&解析
单项选择题
在软件开发中,下面任务不属于设计阶段的是
A.数据结构设计
B.给出系统模块结构
C.定义模块算法
D.定义需求并建立系统模型
点击查看答案&解析
相关试题
下列程序的输出结果是______。 #in...
______允许用户为类定义一种模式,使...
下列程序的输出结果为2,请将程序补充完整...
以下函数模板max()的功能是:返回数组a中...
有如下程序: #include<iostream> usi...