Question OOP-ABS-0019
HardCan a pure virtual function in C++ have a definition (body)?
- A.
Only in templates
- B.
No, never
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Abstraction and Interfaces question
Can a pure virtual function in C++ have a definition (body)?
Only in templates
No, never
Sign up free to see the answer and a step-by-step explanation.
Only if it is static
Yes; the class stays abstract, but derived classes can call the base version explicitly