Polymorphism And Abstract Function MCQ
Polymorphism And Abstract Function MCQ
1. Which of the followings are true about Virtual functions?
Note: This Question is unanswered, help us to find answer for this one
2. 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
3. If abstract class is inherited by derived class, then_______________.
Note: This Question is unanswered, help us to find answer for this one
4. 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
5. We can create objects of the abstract class.
Note: This Question is unanswered, help us to find answer for this one
6. 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
7. _______________ 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
8. 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
9. 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
10. 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
11. 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
12. 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
Programming Languages MCQs | Topic-wise