What is the correct syntax for inheritance?




1) class aclass : public superclass


2) class aclass inherit superclass


3) class aclass <-superclass

Answer Posted / srikanth

class aclass inherit superclass

Is This Answer Correct ?    9 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between abstraction and encapsulation?

592


What is stream in oop?

837


Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.

2006


what type of question are asked in thoughtworks pair programming round ?

1758


What is polymorphism and example?

590






What is the purpose of polymorphism?

675


What is the example of polymorphism?

554


Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.

628


Can you inherit a private class?

631


Why is abstraction needed?

565


What is meant by oops concept?

609


What is interface? When and where is it used?

1664


What are the features of oop?

635


What is the difference between static polymorphism and dynamic polymorphism?

579


What is the difference between inheritance and polymorphism?

587