(A) Main function
(B) In derived class member and friend functions
(C) In base class member and friend functions
(D) None of the above
Category: Object Oriented Programming Mcqs
Object Oriented Programming OOP Mcqs for Screening tests, Interviews, Viva and Other competitive exams. Object Oriented Programming Mcqs section will help users to prepare mcqs of OOP for various exams. Aspirants of Lecturer Computer Science, SST Computer Science, Subject Specialist Computer Science, Data Entry operator, Computer Programmer, Computer Operator, Software engineer and all other Competitive Exams can prepare their Object Oriented programming portion from here.
In case of dynamic memory allocation in a class we should use?
(A) User defined default constructor
(B) User defined copy constructor
(C) Both of the above
(D) None of the above
Consider the code below, class class1{ public: void func1(); }; class class2 : protected class1 { }; Function func1 of class1 is __ in class2.
(A) protected
(B) public
(C) private
(D) None of the above
Only tangible things can be chosen as an object.
(A) True
(B) False
Which of the following may not be an integral part of an object?
(A) Behavior
(B) State
(C) Protected data members
(D) All of the above
If only one behaviour of a derived class is incompatible with base class, then it is?
(A) Specialization
(B) Generalization
(C) Inheritance
(D) Extension
Without using Deep copy constructor, A __ problem can occur.
(A) System crash
(B) Memory leakage
(C) Dangling pointer
(D) All of the above
Class abc{ —– }; Is a valid class declaration?
(A) True
(B) False