题库 软件开发 题目列表 下面代码执行后的输出结果为? #include <ios...
单选题
下面代码执行后的输出结果为?
#include <iostream>
using namespace std;
class A {
    A(const A&) {}
public:
    int num;
    A() {num = 5;}
};
void show(A a) {
    cout << a.num << endl;
}
int main() {
    A a;
    show(a);
    return 0;
}

A.

0

B.

5

C.

运行时报错

D.

编译时报错

题目信息
校招真题
-
正确率
0
评论
9
点击