Choose The Correct Option For The Code Given Belowbr Class A #217
Choose the correct option for the code given below.<br /> class A{ static int c=0; public: A(){ c++; } };
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.
Choose the correct option for the code given below.
class A{ static int c=0; public: A(){ c++; } };
class A{ static int c=0; public: A(){ c++; } };
Constructor will make c=1 for each object created
Constructor will make c=0 for each object created
Constructor will keep number of objects created
Constructor will just initialize c=0 then increment by 1