单选题 下列程序的输出结果是( )。     #include <iostream.h>     int b=2;     int func(int *A)     { b + = *a;return(B) ;}     void main( )     { int a=2,res=2;       res + = func(&A) ;       cout < < res;}
【正确答案】 B
【答案解析】C++类中的静态成员变量是该类中所有对象所共有的,它能够被类中的任何函数调用,所以选项A),选项B),选项C)是错误的。而类的静态数据成员是必须要进行初始化才能使用的。