If the override specifier is added to the end of a member function declaration,what happens if the function is not specified as virtual in the parent class?
A) The function is overridden in the derived class.
B) There is a compiler error.
C) The function in the parent class will always be invoked.
Correct Answer:
Verified
Q22: Write a short program that shows how
Q23: Write a class having a public pure
Q24: What is the error?
class B
{
public:
virtual void f();
};
virtual
Q25: Why do you not get an undefined
Q26: In C++,a virtual destructor is invoked whenever
Q28: Suppose each of the base class and
Q29: Redefining and overriding are exactly the same
Q30: Is there an error?
class B
{
public:
void virtual f();
};
void
Q31: It is desirable to develop your programs
Q32: Give some simple recommendation for when a
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents