OOP Fundamentals: 15 MCQs with answers
All 15 multiple-choice questions from this kit, free and with no sign-up.
Warm-up · 8 questions
Q1. What is the primary characteristic of Object-Oriented Programming (OOP)?
BeginnerShow the answer
A · Data and methods are combined into objects.
OOP is based on objects that combine data and methods, unlike procedural programming where they are separate.
Q2. Which of the following is NOT one of the six pillars of OOP?
BeginnerShow the answer
B · Compilation
Compilation is not a pillar of OOP. The six pillars are Class, Object, Encapsulation, Abstraction, Inheritance, and Polymorphism.
Q3. In OOP, a class is best described as:
BeginnerShow the answer
A · A blueprint for creating objects.
A class is a blueprint that defines the attributes and behaviors of objects, but it does not hold data directly.
Q4. Which concept allows hiding internal implementation details and showing only essential features?
BeginnerShow the answer
D · Abstraction
Abstraction focuses on what an object does rather than how it does it, hiding complex details.
Q5. Inheritance in OOP promotes which of the following?
BeginnerShow the answer
B · Code reusability
Inheritance allows a child class to acquire properties and methods from a parent class, promoting code reusability.
Q6. Polymorphism means:
BeginnerShow the answer
D · Many forms
Polymorphism literally means 'many forms' and allows objects to behave differently based on their type.
Q7. What is an object in OOP?
BeginnerShow the answer
C · An instance of a class.
An object is an instance of a class, created from the class blueprint, and holds its own data.
Q8. Polymorphism allows the same method to behave differently based on the object.
BeginnerShow the answer
A · True
Polymorphism enables methods to have different implementations depending on the object calling them.
Building up · 7 questions
Q9. What is encapsulation primarily used for?
IntermediateShow the answer
A · To bundle data and methods, restricting direct access.
Encapsulation bundles data and methods into a single unit and restricts direct access using access modifiers.
Q10. Which of the following is an advantage of encapsulation?
IntermediateShow the answer
B · It provides data security.
Encapsulation enhances security by hiding internal state and allowing access only through methods.
Q11. Which type of inheritance is NOT mentioned in the source content?
IntermediateShow the answer
B · Parallel
The source lists single, multiple, multilevel, hierarchical, and hybrid inheritance, but not parallel.
Q12. Which mechanism is used to achieve polymorphism?
IntermediateShow the answer
A · Method overloading and method overriding
Polymorphism can be achieved through method overloading (compile-time) and method overriding (runtime).
Q13. Which of the following is an advantage of OOP?
IntermediateShow the answer
C · Modular design
OOP promotes modular design, making development and maintenance easier.
Q14. The relationship between a parent class and a child class is an example of:
IntermediateShow the answer
D · Inheritance
Inheritance establishes an 'is-a' relationship where a child class inherits from a parent class.
Q15. Encapsulation and abstraction are the same concept in OOP.
IntermediateShow the answer
B · False
Encapsulation is about bundling data and methods and restricting access, while abstraction is about hiding complex details and showing only essential features.
Your notes can be a kit like these
Every kit here was made from real study material. Point Veda at a chapter, a PDF, a photo or a link and get notes, flashcards, practice MCQs, games and a scored test — free, in 42 languages.
- Chapter notes
- Flashcards
- Practice MCQs
- Scored tests
- Exam prep
Get Veda free See what students get
Free to start · No ads · Works in 42 languages