What is the correct syntax for inheritance?




1) class aclass : public superclass


2) class aclass inherit superclass


3) class aclass <-superclass

Answer Posted / mahreen

1) class aclass : public superclass

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is polymorphism and types?

579


What is data binding in oops?

560


What is abstraction oop?

597


What is new keyword in oops?

569


How to call a non virtual function in the derived class by using base class pointer

5201






Can main method override?

568


What is difference between class and object with example?

538


How to hide the base class functionality in Inheritance?

618


Why oops is important?

579


What is abstraction in oop with example?

619


What is polymorphism and its types?

566


c++ program to swap the objects of two different classes

1711


Write a program to sort the number with different sorts in one program ??

1890


What is polymorphism and example?

563


What is the significance of classes in oop?

572