Interviewer And Interviewee Guide

C++ Inheritance Interview Question:

How to implement inheritance in C++?

Submitted by: Administrator
class Square: public Shape
{
...
};

In the above example all public members of Shape can be reused by the class Square. If public key word is left, private inheritance takes place by default. If protected is specified the inheritance is applied for any descendant or friend class.
Submitted by: Administrator

Read Online C++ Inheritance Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.