Which Among The Following Is True For The Code Given Belowp Pre #213
Which among the following is true for the code given below?</p> <pre><code class="language-cpp"> class A { private : int marks; char name[20]; public : A(int x=100) { marks=x; } }; </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: Private Access Specifier - Quiz No.1.
Which among the following is true for the code given below?
class A { private : int marks; char name[20]; public : A(int x=100) { marks=x; } };
Objects can be created with one parameter or without parameter
Object can be created only with one parameter
Object can be created with more than one parameter
Objects can be create only without parameter