What Is The Output Of The Following Programp Pre Langcpp #1090

What is the output of the following program?</p> <pre><code class="language-cpp"> class Test { private: static int x; public: static void fun() { cout << ++x << “ ”; } }; int Test :: x =20; void main() { Test x; x.fun(); x.fun(); } </code></pre>

Online Quiz This multiple choice question (MCQ) is related to the book/course gs gs111 OOP Object Oriented Programming Java. It can also be found in gs gs111 Exception Handling & Static Class Members - OOPs MCQ: Static Data Members - Quiz No.2.


Similar question(s) are as followings:



Online Quizzes of gs111 OOP Object Oriented Programming Java

Choose an organization

Theme Customizer

Gaussian Texture



Gradient Background