Question: Consider the following C + + code snippet: Finclude siostream. class shope f public: virtual void dran ( ) ( ) std: :cout Drowing shope....

Consider the following C++ code snippet:
Finclude siostream.
class shope f
public:
virtual void dran()()
std: :cout "Drowing shope...." std: :endl;
3:
ctass circle: public shape {
public:
void dran () override f
std:: cout "Drawing circle..." std: iendl;
}
int main()f
Shape* shapes [1]:
shapes [0]= new (ircle():
for (int 1=0;i1;+i
shapes [i] ;
delete shapes[i];
3
What is the output of the above code?
 Consider the following C++ code snippet: Finclude siostream. class shope f

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!