Question OOP-ABS-0052
Mediumclass Shape { public: virtual double area() = 0; }; Which line then fails to compile?
- A.
Shape s;
- B.
Shape &r = someCircle;
- 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
class Shape { public: virtual double area() = 0; }; Which line then fails to compile?
Shape s;
Shape &r = someCircle;
Sign up free to see the answer and a step-by-step explanation.
Shape *p = nullptr;
class Circle : public Shape { double area() override { return 1; } };