Polymorphism And Abstract Function MCQ
Which of the followings are true about Virtual functions?
Note: This Question is unanswered, help us to find answer for this one
If a class contains pure virtual function, then it is termed as_____________________
Answer
Correct Answer:
Abstract class
Note: This Question is unanswered, help us to find answer for this one
If abstract class is inherited by derived class, then_______________.
Note: This Question is unanswered, help us to find answer for this one
When a virtual function is redefined by the derived class, it is called___________.
Answer
Correct Answer:
Overriding
Note: This Question is unanswered, help us to find answer for this one
We can create objects of the abstract class.
Note: This Question is unanswered, help us to find answer for this one
Find the wrong statement/s about Abstract Class.
Answer
Correct Answer:
We can’t create pointers to an abstract class
Note: This Question is unanswered, help us to find answer for this one
_______________ is a member function that is declared within a base class and redefined by derived class.
Answer
Correct Answer:
Virtual function
Note: This Question is unanswered, help us to find answer for this one
While redefining a virtual function in the derived class, if its prototype is changed then___________________.
Answer
Correct Answer:
It will be overloaded by the compiler And Its virtual nature will be lost
Note: This Question is unanswered, help us to find answer for this one
Run time polymorphism can be achieved with______.
Answer
Correct Answer:
Virtual function
Note: This Question is unanswered, help us to find answer for this one
Syntax for Pure Virtual Function is______________.
Answer
Correct Answer:
Virtual void show()=0
Note: This Question is unanswered, help us to find answer for this one
Runtime polymorphism is achieved only when a virtual function is accessed through a pointer to the base class.
Note: This Question is unanswered, help us to find answer for this one
A virtual function that has no definition within the base class is called____________.
Answer
Correct Answer:
Pure virtual function
Note: This Question is unanswered, help us to find answer for this one