What Will Be The Output Of The Program Given Belowp Pre Langcpp #240
What will be the output of the program given below?</p> <pre><code class="language-cpp"> class A { Public : A(int a=0) { cout<<”new A”; } }; A a; A b; A c; </code></pre>
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 OOps Access Specifiers - OOPs MCQ: Protected Access Specifier - Quiz No.2.
What will be the output of the program given below?
class A { Public : A(int a=0) { cout<<”new A”; } }; A a; A b; A c;
new A new A new A
newAnewAnewA
new Anew Anew A
new A new Anew A