Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

OOPS MCQ Questions and Answers PDF

1. Is it true to use polymorphism in the C programming language?

1. False
2. True

Answer: True

2. Which member function is assumed to call first when there is a case of using function
overloading or abstract class?

1. Local function
2. Global function
3. Function with the highest priority
4. Function with lowest priority

Answer: Function with the highest priority

3. Which of the following language uses the classes but not the polymorphism concept?

1. Object-based language
2. If classes are used, then the polymorphism concept will always be used in the
programming languages.
3. Procedure Oriented language
4. Class-based language

Answer: Object-based language

4. Which function best describe the concept of polymorphism in programming


languages?

1. Virtual function
2. Undefined function
3. Inline function
4. Class member function

Answer: Virtual function

5. Which of the following OOP concept is not true for the C++ programming language?

1. C++ Program can be easily written without the use of classes


2. At least one instance should be declared within the C++ program
3. C++ Program must contain at least one class
4. A class must have member functions

Answer: C++ Program must contain at least one class

6. Which class cannot create its instance?


1. Nested class
2. Parent class
3. Abstract class
4. Anonymous class

Answer: Abstract class

7. What is the extra feature in classes which was not in the structures?

1. Public access specifier


2. Static Data allowed
3. Member functions
4. Data members

Answer: Member functions

8. What is the size of a class?

1. The size of the class is the largest size of the variable of the same class
2. Classes in the programming languages do not have any size
3. Sum of the size of all the variables within a class.
4. Sum of the size of all inherited variables along with the variables of the same class

Answer: Classes in the programming languages do not have any size

9. Which member of the superclass is never accessible to the subclass?

1. Protected member
2. Private member
3. Public member
4. All of the above

Answer: Private member

10. How many types of polymorphism in the C++ programming language?

1. Two types of polymorphism


2. Four types of polymorphism
3. Three types of polymorphism
4. Five types of polymorphism

Answer: Two types of polymorphism

11. Which function best describe the concept of polymorphism in programming


languages?

1. Virtual function
2. Undefined function
3. Class member function
4. Inline function
Answer: Virtual function

12. Which of the following feature is also known as run-time binding or late binding?

1. Dynamic loading
2. Data hiding
3. Dynamic typing
4. Dynamic binding

Answer: Dynamic binding

13. Which among the following cannot be used for the concept of polymorphism?

1. Member function overloading


2. Global member function
3. Static member function
4. Constructor Overloading

Answer: Static member function

14. Which of the following OOP concept binds the code and data together and keeps
them secure from the outside world?

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

Answer: Encapsulation

15. Which among the following is not a member of the class?

1. const function
2. Friend function
3. Static function
4. Virtual function

Answer: Friend function

16. Which of the following definition is incorrect for polymorphism?

1. Polymorphism concept is the feature of object-oriented programming (OOP)


2. Ease in the readability of the program
3. Polymorphism helps in redefining the same functionality
4. It always increases the overhead of function definition

Answer: It always increases the overhead of function definition

17. Which of the following class is known as the generic class?


1. Template class
2. Efficient code
3. Final class
4. Abstract class

Answer: Template class

18. Which header file is required by the C++ programming language to use the OOPS
concept?

1. stdlib.h
2. We can easily use the OOPS concepts in c++ programs without using any header file.
3. iostream.h
4. stdio.h

Answer: We can easily use the OOPS concepts in c++ programs without using any
header file.

19. Which operator overloads using the friend function?

1. *
2. =
3. ()
4. ->

Answer: *

20. Which of the following language supports polymorphism but not the classes?

1. Ada programming language


2. C# programming language
3. C++ programming language
4. Java programming language

Answer: Ada programming language

21. Which two features of object-oriented programming are the same?

1. Inheritance and Encapsulation features are the same


2. Abstraction and Polymorphism features are the same
3. Encapsulation and Abstraction
4. Encapsulation and Polymorphism features are the same

Answer: Encapsulation and Abstraction

22. Which operator from the following can be used to illustrate the feature of
polymorphism?

1. Overloading &&
2. Overloading | |
3. Overloading +=
4. Overloading <<

Answer: Overloading <<

23. Which feature of OOPS described the reusability of code?

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

Answer: Inheritance

24. A single program of OOPS contains _______ classes?

1. Only 100
2. Only 999
3. Any number
4. Only 1

Answer: Any number

25. Which of the following is not an OOPS concept?

1. Polymorphism
2. Abstraction
3. Exception
4. Encapsulation

Answer: Exception

26. Which feature of OOPS derives the class from another class?

1. Data hiding
2. Polymorphism
3. Inheritance
4. Encapsulation

Answer: Inheritance

27. Who developed object-oriented programming?

1. Adele Goldberg
2. Alan Kay
3. Andrea Ferro
4. Dennis Ritchie

Answer: Alan Kay


28. Define the programming language, which does not support all four types of
inheritance?

1. Kotlin
2. Java
3. C++
4. Smalltalk

Answer: Java

29. Which among the following feature is not in the general definition of OOPS?

1. Efficient Code
2. Duplicate or Redundant Data
3. Modularity
4. Code reusability

Answer: Duplicate or Redundant Data

30. Which of the following language was developed as the first purely object
programming language?

1. C++
2. Java
3. Kotlin
4. SmallTalk

Answer: SmallTalk

You might also like