Question from the C++ test

Compile time error as object of class Circle cannot be created

Hard

Consider the following code:

class Shape
{
        	public:
        	virtual void perimeter() = 0;
        	void print()
        	{
   	             	std::cout<<"Printing from Shape"<<std::endl;
        	}
};
class Circle : public Shape
{
        	public:
        	void print()
        	{
	    	std::cout<<"Printing from Circle"<<std::endl; 
        	}
};

What would be the output of the following?

Circle object;
object.print(); 	
Author: Abha AgrawaStatus: PublishedQuestion passed 442 times
Edit
-1
Community Evaluations
developer avatar
Spelling / formatting error
Auteur anonyme
14/06/2024
"Object" is capitalized