Which Among The Following Is Correct For The Code Given Belowp #212
Which among the following is correct for the code given below?</p> <pre><code class="language-cpp"> class student { private: student() { } public : student( int x) { 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 correct for the code given below?
class student { private: student() { } public : student( int x) { marks =x; } };
The object can never be created
The object can be created without parameters
Only the object with only 1 parameter can be created
Only the object with some parameters can be created