Polymorphism Mcqs In Object Oriented Programming(OOP)
Polymorphism OOP Solved MCQs
Lets us see the Polymorphism (OOP) Solved MCQs.
1. Which one is the best description of polymorphism?
A. It is the ability for undefined message/data to be processed in at least one way
B. It is the ability for a message/data to be processed in more than one form
C. It is the ability for many messages/data to be processed in many ways
D. none of these
2. The languages that support classes but not polymorphism is called?
A. child Class-based language
B. Class-based language
C. Object-based language
D. Procedure Oriented language
3. Which one is the language that does not support polymorphism but support classes?
A.C#
b) Ada
c) C++
d) Java
4. The feature that its specification is if same message is passed to objects of several different classes and all of those can respond in a different way then it is called?
A. Inheritance
B. Classes
C. Polymorphism
D. none of these
5. Which type of function shows polymorphism among the following?
A. Inline function
B. Virtual function
C. Undefined functions
D. Class member functions
6. In case of using abstract class or function overloading, the function is supposed to be called first?
A. Local function
B. Function with the highest priority in the compiler
C. Global function
D. none of these
7. Which one of the following can’t be used for polymorphism?
A. Member functions overloading
B. Static member functions
C. global member function
D. Constructor overloading
8. Which one of the following can show polymorphism?
A. Overloading ||
B. Overloading &&
C. Overloading <<
D.Overloading +=
9. Polymorphism is also possible in C language is it correct.
a) Yes
b) No
C. both A&B
D. none of these
10. The problem may arise if we use abstract class functions for polymorphism in OOP?
A. All classes are converted as an abstract class
B. All the derived classes must implement the undefined functions
C. abstract class must have derived a class
D. Derived classes can’t redefine the function
11. Which of the following is not true for polymorphism?
A. It is a feature of OOP
B. Ease in the readability of a program
C. Helps in redefining the same functionality
D. Increases overhead of function definition always
12. If two classes derive one base class and redefine a function of the base class, also overload some operators inside the body of the class. Among these two things of function and operator overloading, the polymorphism is used where?
A. Function overloading only
B. Operator overloading only
C. Either function overloading or operator overloading because polymorphism can be applied only once in a program
D. Both of these are using polymorphism
13. Which class or set of classes can illustrate polymorphism in the following code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | abstract class student { public : int marks; calc_grade(); } class topper:public student { public : calc_grade() { return 10; } }; class average:public student { public : calc_grade() { return 20; } }; class failed{ int marks; }; |
A. Only class student can show polymorphism
B.All class student, topper and average together can show polymorphism
C.Only class student and topper together can show polymorphism
D. none of these
14. What is the output of the following code?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | class student { public : int marks; void disp() { cout<<”its base class”; }; class topper:public student { public : void disp() { cout<<”Its derived class”; } } void main () { student s; topper t; s.disp(); t.disp(); } |
A. its base class its derived class
B. its base class its derived class
C. its derived class it’s base class
D. none of these
15. what is the output of the following program:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | class education { char name[10]; public : disp() { cout<<”Its education system”; } class school:public education { public: void dsip() { cout<<”Its school education system”; } }; void main() { school s; s.disp(); } } |
A. Its school education system
B. its school education system
C. its education system
D. none of these
16. The provision of a single interface to entities of different types is called?
A. polymorphism
B. dimorphism
C. trimorphism
D. none of these
17. Using operation or function in different ways depending on what they are operating on is called?
A. classes
B.inheritence
C. polymorphism
D. dimorphism
18. Run time polymorphism is achieved only when a ……………….. Is accessed through a pointer to the base class.
A) static function
B) Real function
C. Member function
D) Virtual function
19. A class serves as base class for many derived classes it is called:
A. polymorphism
B. multipath inheritance
C .hierarchical inheritance
D. none of these
20. The two or more classes serve as base class for a derived class, then this situation is called .
A. Polymorphism
B. multiple inheritance
C. encapsulation
D. none of these
More MCQs on Polymorphism
- Virtual Function MCQs
- Operator Overloading MCQs
OOP MCQs
- OOP intro & examples MCQs
- Classes and Inheritance MCQs
- Friend Function MCQs
- Virtual Function MCQs
- Polymorphism MCQs
- Polymorphism MCQs 2
- Operator overloading MCQs
- Object Oriented Programming MCQs – Very Important
Programming C Plus Plus MCQs Homepage
- Low-level and high-level languages MCQs
- Procedural and non Procedural languages MCQs
- C++ STANDARD LIBRARY MCQs
- Array MCQs
- Arrays MCQs 2
- Pointers Solved MCQs
- Inline Function MCQs – C++
- Top 50 Programming C++ MCQs
- MCQs of introduction to programming
- Past Papers 2022 C++ MCQs
- Past Papers 2021 C++ MCQs
- Past Papers 2020 C++ MCQs
- Past Papers 2019 C++ MCQs
- Highly Recommended C++ Important MCQs with Explanation
- OOP
- OOP intro & examples MCQs
- Classes and Inheritance MCQs
- Friend Function MCQs
- Virtual Function MCQs
- Polymorphism MCQs
- Polymorphism MCQs 2