Object-Oriented Programming MCQs (Part-14)

What is the primary role of Constructors in OOP?

A Clone
B Initialize
C Modify
D Overload

What does Destructor in OOP typically do?

A Release resources
B Overload method
C Clone object
D Initialize object

What is the purpose of Access Modifiers in OOP?

A Increase security
B Store data
C Control visibility
D Clone objects

Which binding is resolved at compile time in OOP?

A Late
B Dynamic
C Static
D Early

Which binding is resolved at runtime in OOP?

A Late
B Dynamic
C Early
D Static

Which method allows a class to inherit properties from another class in OOP?

A Abstraction
B Polymorphism
C Inheritance
D Encapsulation

Which concept allows the same method name to behave differently based on input?

A Overloading
B Inheritance
C Cloning
D Overriding

What does Method Overriding allow in OOP?

A Avoid inheritance
B Change inherited method
C Clone objects
D Prevent access

Which OOP principle ensures that classes can interact with each other through interfaces?

A Inheritance
B Encapsulation
C Abstraction
D Polymorphism

Which of the following is true for Abstract Classes in OOP?

A Have abstract methods
B Must be inherited
C Cannot be instantiated
D All of the above

What is the role of Interfaces in OOP?

A Manage memory
B Provide method signatures
C Create objects
D Implement functionality

Which OOP design pattern ensures that only one instance of a class is created?

A Factory
B Observer
C Builder
D Singleton

What is the main purpose of Exception Handling in OOP?

A Prevent crashes
B Control object state
C Reuse code
D Optimize performance

Which technique helps in managing resources like memory in OOP?

A Exception Handling
B Event Handling
C Method Overloading
D Garbage Collection

Which design pattern is used for creating objects without specifying the exact class?

A Prototype
B Factory
C Builder
D Singleton