what is the difference between containership and inheritence?
Answer / sandeep choudhary
inheritance is the ability for a class to inherit of
properties and the behavior from a parent class by extending it.
while containership is the ability of a class to contain the
another objects as member data.
if a class is extended, it inherits all the public and
protected properties and the behaviors and those behavior
may be overridden by the sub class.but if a class is
contained in another, container class does not have the
ability to add and modify of contained.
Is This Answer Correct ? | 47 Yes | 2 No |
What is multilevel inheritance in oop?
What is the difference between Home and $Home?
why c++ is called OOPS? waht is inherutance? what is compiler?
what is virtual destructor
What are oops methods?
What is pure oop?
if u write a class do u write Assignment operator and copy constructor
What are the OOPS concepts?
106 Answers A1 Technology, Bajaj, CTS, EDS, HP, Infosys, Intel, Microsoft, MNC, Persistent, PlanetSoft, ProConstructor, TCS, Virtusa, Wipro, YSoft Solutions,
What is the types of inheritance?
Program to read a comment string
what type of questions
#include <iostream> using namespace std; struct wow { int x; }; int main() { wow a; a.x = 22; int c = a.x; int *b = new int; cout << c; return 0; } option: No output 0 22 -(11) Will not compile