试题与答案

有以下程序: #include <iostream> using namespa

题型:单项选择题

题目:

有以下程序:
#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

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2018/0418/4dcd329e4920b4f0185c2cb3769d5f5d.html

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

参考答案:错

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