有以下程序:
#include <iostream>
using namespace std;
class count

static int n;
public:
count ( )

n++;

static int test( )

for (int i = 0; i < 4; i++ )
n++;
return n;

;
int count :: n = 0;
int main( )

cout<<count :: test( )<<" ";
count c1, c2;
cout<<count :: test( )<<end1;
return 0;

执行后的输出结果是( )。

题库:计算机等级考试 类型:最佳选择题 时间:2017-07-03 15:02:25 免费下载:《单选题》Word试卷

有以下程序:
#include <iostream>
using namespace std;
class count

static int n;
public:
count ( )

n++;

static int test( )

for (int i = 0; i < 4; i++ )
n++;
return n;

;
int count :: n = 0;
int main( )

cout<<count :: test( )<<" ";
count c1, c2;
cout<<count :: test( )<<end1;
return 0;

执行后的输出结果是( )。
A.4 10
B.1 2
C.22
D.24

有以下程序:  #include <iostream>  using namespace std;  class count      static int n

本题关键词:程序,有序镜检,大腿以下或膝以下肌肉瘫痪,工程施工程序,复苏程序,工作程序,建设程序,程序变更,程序冲突,点火程序;

微信扫码获取答案解析
下载APP查看答案解析