1
What will be the output of the program?
#include <iostream>
using namespace std;
class Shape { public: virtual const char* name() { return "shape"; } virtual ~Shape() {} };
class Circle : public Shape { public: const char* name() override { return "circle"; } };
int main() {
Shape *s = new Circle();
cout << s->name() << endl;
delete s;
return 0;
}Easy