假定有如下程序:#include <iostream>using namespace std;int s =0;class example{ static int n
假定有如下程序: #include <iostream> using namespace std; int s =0; class example{ static int n; public: example(int i){ n=i; } static void add(){ s+=n; } }; int example::n=0; int main(){ example a(2),b(5); example::add(); cout<<s<<endl; return 0; }程序运行后输出结果为()。
A.2
B.3
C.7
D.5