CS Electrical And Electronics
@cselectricalandelectronics

Identify invalid assignment from the following, considering Shape as base class and circle as derived class

All QuestionsCategory: Cpp LanguageIdentify invalid assignment from the following, considering Shape as base class and circle as derived class
Anonymous asked 3 years ago

Options:
 

  1. Shape *p1 = new Circle(7);
  2. Circle *p2 = new Circle(7);
  3. Circle *p3 = new Shape(10);
  4. None of the above