(A) True
(B) False
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.
Given the following class class Base { int Age=33; } How you can improve above class with respect to accessing the field Age?
(A) Define the variable Age as private
(B) Define the variable Age as protected
(C) Define the variable Age as private and create a get method that returns it and a set method that updates it
(D) Define the variable Age as protected and create a set method that returns it and a get method that updates it
C++ compiler does not allow to dynamically allocate memory for objects.
(A) True
(B) False
__ is/are used to access information hidden within an object.
(A) Private data members
(B) Private member functions
(C) Interface
(D) None of the above
What a derived class can add?
(A) New data members
(B) New member functions and New friend functions
(C) New constructors and destructor
(D) All of the above
Suppose there is an object of type Person, which of the following can be considered as one of its attributes?
(A) Age
(B) Name
(C) Work()
(D) Both Name and Age
The members of a class that can be accessed without creating the object of the class is called?
(A) Private member
(B) Public member
(C) Data member
(D) Static
A class can be identified from a statement by?
(A) Noun
(B) Pronoun
(C) Verb
(D) Adverb