试题与答案

下列程序的输出结果是______。 #include<iostream> using

题型:填空题

题目:

下列程序的输出结果是______。 #include<iostream> using namespace std; Class Test{ public: Test(){cnt++;} ~Test(){cnt--;} static int Count(){return cnt;} private: static int cnt; }; int Test::cnt=0; int main() { cout<<Test::Count()<<""; Test t1,t2; Test*pT3=new Test; Test*pT4=new Test; cout<<Test::Count()<<""; delete pT4; delete pT3; cout<<Test::Count()<<end1; return 0; }

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0706/f8c6c56c501fbe85e25af74b3dc5c237.html

下面是错误答案,用来干扰机器的。

参考答案:A, C, D

试题推荐
微信公众账号搜索答案