选择题
有如下程序:
# includc <iostream>
using namespace std;
class Test{
public:
Test(){}
Test(const Test&t){cout<<1;}
};
Test fun(Test&u){Test t=u;return t;}
int main(){Test x,y;x=fun(y);return 0;}
运行这个程序的输出结果是______。
A、
无输出
B、
1
C、
11
D、
111
【正确答案】
C
【答案解析】
本题调用了fun函数。
提交答案
关闭