运行下列程序结果为____________________。#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<
有如下类定义及类应用,试问,该程序输出为____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 stu2=stu1; cout<
有如下类定义及类应用,试问,该程序输出____class CStudent{ int sno;public: CStudent(int sno):sno(sno) { } CStudent():sno(0){} CStudent(CStudent& stu){ sno=stu.sno+1;} void display(){cout<