运行下列程序后,” constructing A!” 和” destructing A!”分别输出几次()。#includeclass A{int x;public:A(){cout<<" constructing A!"<
A. 2次,2次
B. 3次,3次
C. 1次,3次
D. 3次,1次
运行下列程序结果为____________________。#include#includeusing namespace std;class MyClass{public:MyClass(){cout<<'A';}MyClass(char c){cout<
ABX
B. ABXB
C. AXB
D. AXBB
运行下列程序结果为____________________。#include#includeusing namespace std;class MyClass{public:MyClass(){cout<<'A';}MyClass(char c){cout<
AB
B. AAAB
C. AAAAB
D. AAAABBBB
有如下类定义及类应用,试问,该程序输出为____class CStudent{ int sno;public: static int stuCount; CStudent(int sno):sno(sno) { stuCount++;} ~CStudent(){}};int CStudent::stuCount=0;int main(){ CStudent stu1(1); CStudent *pstu=new CStudent(2); cout<