Object Oriented Programming MCQs with Answers for Placement Tests
Q. 1 Which of the following is not a pillar of Object-Oriented Programming (OOP)?
Check Solution
Ans: D
The four main pillars of OOP are Encapsulation, Abstraction, Inheritance, and Polymorphism. Integration is not a core concept of OOP.
Q. 2 In OOP, what concept allows a class to inherit properties and methods from another class?
Check Solution
Ans: B
Inheritance is the mechanism in which one class (subclass) inherits the attributes and methods of another class (superclass).
Q. 3 What is the process of bundling data (variables) and the methods that operate on the data into a single unit called?
Check Solution
Ans: C
Encapsulation is the practice of bundling data and the methods that operate on that data into a single unit, which restricts direct access to some of the object’s components.
Q. 4 Which of the following terms describes the ability of a single function or method to behave in multiple ways?
Check Solution
Ans: C
Polymorphism, meaning “many forms,” is the principle that allows an object to take on many forms. This is often implemented through method overloading and method overriding.
Q. 5 A blueprint for creating objects is called a:
Check Solution
Ans: B
A class is a template or blueprint from which objects are created. It defines the properties and behaviors that the objects will have.
Q. 6 The act of hiding the internal implementation details and showing only the essential features to the user is known as:
Check Solution
Ans: B
Abstraction is a concept that focuses on showing only the necessary information to the user and hiding the complex implementation details.
Q. 7 What is the term for a specific instance of a class, created at runtime?
Check Solution
Ans: A
An object is a real-world entity that is a specific instance of a class. It can have state and behavior.
Q. 8 In C++ and Java, which keyword is used to access the methods and properties of the base class from a derived class?
Check Solution
Ans: B
The super keyword is used to refer to the immediate parent class or its members, allowing a subclass to access the members of its superclass.
Q. 9 Method Overloading is an example of which type of polymorphism?
Check Solution
Ans: D
Method overloading, where multiple methods in the same class have the same name but different parameters, is resolved at compile time. It is a form of compile-time or static polymorphism.
Q. 10 What is the primary purpose of a constructor in a class?
Check Solution
Ans: B
A constructor is a special method in a class that is automatically called when a new object of that class is created. Its main purpose is to initialize the new object’s data members.
Next Topic: Operating System (OS) MCQs with Answers for Placements
Practice Aptitude Questions for Placements
Crack Placement Tests: Faster & Smarter
Adaptive Practice | Real Time Insights | Resume your Progress
