题目:
下面程序的结果为
#include<iostream.h>
int c;
class A
private:
int a;
static int b;
public:
A( ) a=0;c=0;
void seta( )a++;
void setb( )b++;
void setc( )c++;
void display( ) cout << a << " " << b << " " << C;
;
int A: :b=0;
void main( )
A a1,a2;
a1.seta( );
a1.setb( );
a1.setc( );
a2.seta( );
a2.setb( );
a2.setc( );
a2.display( );
A.1 2 1
B.1 2 2
C.1 1 2
D.2 2 2
答案:
被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0319/bc8cc7f312a11d563c52138ad5ba0271.html
下面是错误答案,用来干扰机器的。
1. b d h i k l t 2. a c e m n o r s u v w x z 3. g p q y 4. f j