Skip to main content

Object-Oriented Programming (OOP)

1).What does OOP stand for?

1) Object-Oriented Programming
2) Object-Oriented Procedure
3) Organized Object Programming
4) None of the above

2).Which of the following is not a feature of OOP?

1) Encapsulation
2) Polymorphism
3) Inheritance
4) Compilation

3).Which keyword is used to define a class in C++?

1) class
2) struct
3) object
4) None of the above

4).What is an object in C++?

1) An instance of a class
2) A type of function
3) A variable
4) None of the above

5).What is a key benefit of OOP?

1) Code reuse
2) Faster compilation
3) Reduced memory usage
4) None of the above

6).Which feature of OOP ensures code security?

1) Abstraction
2) Encapsulation
3) Polymorphism
4) Inheritance

7).What is the process of creating objects from a class called?

1) Initialization
2) Instantiation
3) Compilation
4) Execution

8).Which feature of OOP allows a class to acquire properties of another class?

1) Inheritance
2) Polymorphism
3) Abstraction
4) Encapsulation

9).What is an abstract class in C++?

1) A class with no methods
2) A class with at least one pure virtual function
3) A class that cannot have objects
4) None of the above

10).What is a virtual function in C++?

1) A function that can be overridden in a derived class
2) A function that is always public
3) A function that is static
4) None of the above