--:--









Quiz for Pure virtual functions and abstract classes

Course: C++ Language | Subject: Unit 7 | Topic: Polymorphism



Logo

Q1: What is a pure virtual function in C++?

Logo

Q2: What is an abstract class?

Logo

Q3: Why use pure virtual functions?

Logo

Q4: Can an abstract class have a constructor?

Logo

Q5: Can a pure virtual function have an implementation?

Logo

Q6: What happens if a derived class does not implement all pure virtual functions?

Logo

Q7: Can you create an object of an abstract class?

Logo

Q8: What keyword is used to declare a pure virtual function?

Logo

Q9: What is the primary use of abstract classes?

Logo

Q10: Can abstract classes contain non-pure virtual functions?

Logo

Q11: Which of these makes a class abstract?

Logo

Q12: Are pure virtual destructors allowed?

Logo

Q13: What is the role of a pure virtual destructor?

Logo

Q14: Can pure virtual functions be overloaded?

Logo

Q15: Which of these is true about abstract classes?

Logo

Q16: How are pure virtual functions implemented?

Logo

Q17: What happens if you try to instantiate an abstract class?

Logo

Q18: Can abstract classes have constructors?

Logo

Q19: Is it possible to provide implementation for a pure virtual function?

Are you ready to start test? Set your time limit