OOPS MCQ UNIT-III

Estudies4you
OOPS MCQ JNTUH
UNIT - III 
I. Fill in the Blanks 
1. ________ is the base class for all the classes by default. 

2. ________ is a keyword used by subclass to refer to its immediate superclass. 

3. ________ keyword is used to inherit a class. 

4. ________ refers to the process of deriving a class from another derived class. 

5. ________ variables cannot be inherited. 

6.  ________ is an object oriented technique used for deriving the features of one class to another class. 

7. ________ is a class from which other classes can be inherited. 

8. The class that is inherited from a base class is called as ________ 

9. The three access specifiers are  ________, and ________ 

10. ________ is achieved through operator overloading.

II. Multiple Choice 
1. Which of the following is an access specifier? 
(a) class 
(b) virtual 
(c) public 
(d) void 

2. In multilevel inheritance, the middle class acts as  ________.
(a) Only base class 
(b) Only derived class 
(c) Protected class 
(d) Base class as well as derived class 

3. The class is declared as virtual when ________ 
(a) We want to prevent a base class inheritance 
(b) More than one class is derived 
(c) Two or more classes involved in inheritance have a common base class 
(d) Both (a) and (b) 

4. The derived class without a pure virtual function is called ________ .
(a) Concrete class 
(b) Abstract class 
(c) Container class 
(d) Derived class 

5. The functions that are declared inside a base class without any relative definition are known as ________.
(a) Pure member functions 
(b) Pure virtual functions 
(c) Both (a) and (b) 
(d) None of the above 

6. Class declaration provides ________.
(a) Data hiding 
(b) Encapsulation 
(c) Abstraction 
(d) All of the above 

7. Destructors can be ________.
(a) Able to return result 
(b) Explicitly called 
(c) If any data type 
(d) Overloaded 

8. The functions whose declarations are preceded with a keyword 'virtual' are ________.
(a) Virtual functions 
(b) Member functions 
(c) Pure virtual. functions 
(d) All of the above 

9. ________ can take several forms based on type of objects.
(a) Encapsulation 
(b) Polymorphism 
(c) Abstraction 
(d) Inheritance 

10. Which of the following is an example of polymorphism? 
(a) Method overloading
(b) Anonymous classes 
(c) Inner class 
(d) Method overriding 

III. Match the Following 

1. Pure virtual functions

[ ]

(a) Avoids ambiguity

2. Destructor 

[ ]

(b) do-nothin

3. Inheritance 

[ ]

(c) tilde (~)

4. Class declaration

[ ]

(d) Extends keyword

5. `virtual' keyword

[ ]

(e) Encapsulation


To Top