Polymorphism MCQs Viva Questions

What is Polymorphism?
(A). Polymorphism means more than one function with the same tasks
(B). Polymorphism means more than one function with different tasks
(C). Polymorphism means functions with the same tasks
(D). Polymorphism means many functions in the main function with different names

Example of option (B). Polymorphism means more than one function with different tasks (Function overloading)


What is Operator overloading? 

(A). defining additional tasks to operators without changing their actual meaning
(B). defining additional tasks to operators by changing their actual meaning
(C). to discourage the operator to work according to its actual meaning
(D). None of these

Example of the option (A). defining additional tasks to operators without changing their actual meaning

Polymorphism MCQs Viva Questions
Polymorphism MCQs Viva Questions

A new definition to base class function in the derived class with the same signatures is called ______?

(A). Function overloading
(B). Function overriding
(C). Friend Function
(D). None of these

Example of option (B). Function overriding

Function Overriding C++


Which is the example of compile time Polymorphism?
(A). Function Overloading
(B). Operator Overloading
(C). A and B 
(D). Function overriding


Which is the example of run time Polymorphism?
(A). Function Overloading
(B). Operator Overloading
(C). Function overriding
(D). B and C


How more than one function can be implemented in Polymorphism?
(A). two functions in the same class
(B). two functions in the different class
(C). one function in parent and one in child class
(D). All of these

Example of the option (A). two functions in the same class

Example of option (B). two functions in a different class, (C). tone function in parent and one in child class


Which of the following can have Polymorphism?
(A). Only functions
(B). only operators
(C). both functions and operators
(D). None of these

Example of the option (A).  Functions Polymorphism

 

Example of option (B).  operators Polymorphism
Greater than Operator Overloading C++


Important table for viva questions & MCQs

Early binding late binging
Order of Execution: 1st(Early binding) then 2nd (late binging)
static binging Dynamic Binding
Compile-time Run time polymorphism
Matching of a function call with function definition is performed at compiler time. Matching of a function call with function definition is performed at run time.
Full information about function calling and matching with function definition  is visible to the compiler during compile time Full information about function calling and matching with function definition is not visible to the compiler during compile time but it’s visible during run time.
More  efficient: because the compiler already has knowledge that what code will execute More flexible:

 

Fast execution Slow execution
Examples: Function overloading and operator overloading Examples: Virtual functions

OOP MCQs 

Programming C Plus Plus MCQs Homepage

shamil memory table

Computer Science Repeated MCQs Book Download