1.

What is the output of the following program?
 class Test { private: static int x; public: static void fun() { cout << ++x <<    ; } }; int Test :: x =20; void main() { Test x; x.fun(); x.fun(); }  

A. 20 22
B. 20 21
C. 21 22
D. 22 23
Answer» D. 22 23


Discussion

No Comment Found