填空题 程序的输出结果是 【14】
#include <iostream>
using namespace std;
class A
int x;
public:
A(int x=1):x(x)cout<<x;

void main()
A a,b(2),c(3);


  • 1、
【正确答案】 1、123    
【答案解析】[解析] a对象使用和默认的构造函数,b对象使用2来初始化对象c对象使用3来初始化对象,输出相应的值后,结果变为123。