OOPS MCQ UNIT-II

Estudies4you
C++ MCQ JNTUH
UNIT - II (As per JNTUH R18 Syllabus CSE & IT II-Year Semester I)
I. Fill in the Blanks 
1. ________ is an abstract data type that groups data and its associated functions. 

2. ________ is an instance of a class. 

3. ________ exhibits the same characteristics as predefined data types. 

4. The reference of an object can be created using ________ keyword. 

5. A class which is preceded by a keyword friend is called as ________ 

6. Functions which are declared in a class are called ________

7. The static members of a class are ________ and ________

8. ________ is a special kind of method that determines how an object is initialized when created. 

9. ________ is a special member function that is used to destroy the objects created by constructor. 

10.  ________ is a process of showing relevant details from the user i.e., the implementation details. completely hidden from the user. 

II. Multiple Choice 
1. A non-member function that can access the private data of class is known as ________
(a) Static function 
(b) Friend function 
(c) Member function 
(d) Library function 

2. Constructor and destructor are automatically invoked by ________
(a) Operating system
(b) main( ) function
(c) Compiler 
(d) Object

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

4. Constructors have the same name as ________ 
(a) The class they belong to 
(b) The current program file name
(c) Class name and preceded by 
(d) Both (a) and (c) 

5. Constructors are executed when ________ 
(a) Object is destroyed 
(b) Object is declared 
(c) Both (a) and (b) 
(d) None of the above 

6. The destructor is executed when  
(a) Object holds nothing 
(b) Object goes out of scope 
(c) Object is trot used 
(d) None of the above 

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

8. Abstract data types are mainly used to 
(a) Specify how data values are stored in memory 
(b) Describe the operations performed on the data types 
(c) Explain data types behaviour 
(d) All the above 

9. Data abstraction the data. 
(a) Changes 
(b) Deletes 
(c) Hides 
(d) None of the above

10. A ________ involves recognizing and focusing on the important characteristics of a situation or object. 
(a) Encapsulation 
(b) Polymorphism 
(c) Abstraction 
(d) Inheritance 

III. Match the Following

1. Object

[ ]

(a) To build objects

2. Class 

[ ]

(b) Instance of a class

3. Class scope 

[ ]

(c) State of the class

4. Data members

[ ]

(d) Abstract data type

5. Information hiding

[ ]

(e)Accessibility or Visibility


To Top