0% found this document useful (0 votes)
155 views2 pages

Cdac Oops Mcqs

The document contains a set of 50 multiple-choice questions (MCQs) focused on Object-Oriented Programming (OOP) concepts. Key topics include features of OOP such as encapsulation, inheritance, polymorphism, and abstraction, along with specific programming language syntax and behavior. It serves as a study guide for understanding fundamental OOP principles and their applications in programming languages like C++ and Java.

Uploaded by

shindeyashashri5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
155 views2 pages

Cdac Oops Mcqs

The document contains a set of 50 multiple-choice questions (MCQs) focused on Object-Oriented Programming (OOP) concepts. Key topics include features of OOP such as encapsulation, inheritance, polymorphism, and abstraction, along with specific programming language syntax and behavior. It serves as a study guide for understanding fundamental OOP principles and their applications in programming languages like C++ and Java.

Uploaded by

shindeyashashri5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

CDAC OOPs MCQs (Object-Oriented Programming - 50 Questions)

1. Which of the following is not a feature of OOP?

a) Encapsulation b) Inheritance c) Compilation d) Polymorphism

2. Which feature of OOP describes reusability?

a) Inheritance b) Polymorphism c) Abstraction d) Encapsulation

3. What is used to hide internal implementation details?

a) Inheritance b) Abstraction c) Encapsulation d) Polymorphism

4. Which OOP concept binds data and functions together?

a) Inheritance b) Encapsulation c) Abstraction d) Overloading

5. Which of the following allows function overloading?

a) Same name, different parameters b) Same parameters c) Different names d) None

6. Which keyword is used to inherit a class in C++?

a) this b) base c) public d) extends

7. What is polymorphism?

a) Many forms of a function or method b) Single form only c) Code duplication d) Object cloning

8. Overloading and Overriding are types of:

a) Inheritance b) Polymorphism c) Encapsulation d) Data hiding

9. Which of the following supports dynamic polymorphism?

a) Virtual functions b) Static functions c) Constructors d) Inline functions

10. Which language is not fully object-oriented?

a) Java b) Python c) C++ d) C

11. What is the output of:

class A { public: void show() { cout << 'A'; } };

class B: public A { public: void show() { cout << 'B'; } };

A *obj = new B(); obj->show();

a) A b) B c) Compilation error d) A (if show not virtual)

12. Which access modifier restricts access to the class itself?

a) public b) private c) protected d) static

13. In Java, all classes by default inherit from:

a) BaseClass b) Object c) Root d) System

14. Constructor overloading means:


a) More than one constructor in a class b) Overriding constructor c) Inheriting constructor d) Static constructor

15. Destructor is used for:

a) Creating objects b) Copying objects c) Deleting objects d) Overriding objects

16. Which of these is not a pillar of OOP?

a) Encapsulation b) Inheritance c) Compilation d) Polymorphism

17. Abstraction is:

a) Showing only essential features b) Hiding everything c) Binding code d) Memory allocation

18. Which keyword is used to prevent inheritance?

a) final b) static c) const d) virtual

19. Which method is called when an object is created?

a) Destructor b) Constructor c) Copy Constructor d) Virtual method

20. Which is used to call the base class constructor?

a) super b) base c) parent d) this

You might also like