Select the correct answerWhich of the provided options is the correct way to declare a pure virtual function?Optionsvirtual void Display(void) = 0;virtual void Display = 0;virtual void Display(void){0};void Display(void) = 0;
Question
Select the correct answerWhich of the provided options is the correct way to declare a pure virtual function?Optionsvirtual void Display(void) = 0;virtual void Display = 0;virtual void Display(void){0};void Display(void) = 0;
Solution
The correct way to declare a pure virtual function is:
virtual void Display(void) = 0;
Similar Questions
Which of the provided options is the correct way to declare a pure virtual function?
Which of the following correctly defines a pure virtual function?virtual void func() = 0;void virtual func() = 0;pure virtual void func() = 0;virtual void func();
Which of the following is true about pure virtual functions?They must be defined in the base class.They can have a definition in the base class.They make a class abstract and cannot be instantiated.They are defined using the keyword pure.
Which of the following is an example of a class with a pure virtual function in C++?
What is the purpose of a pure virtual function in C++?
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.