![]() Related Questions Inheritance is the process of creating new classes, called derived classes, from existing classes or base classes. The derived class inherits all the capabilities of the base class, but can add embellishments Latest Answer : hi,Inheritance is the process of creating a new class called derived class from the existing class called base class. ... Tags : Inheritance Virtual destructors: If an object (with a non-virtual destructor) is destroyed explicitly by applying the delete operator to a base-class pointer to the object, the base-class destructor function (matching Latest Answer : Virtual constructor is not build-in C++ feature but it doesn't mean its not used by devs in code and in conversations. There are many other things that doesn't exist in particular language yet, people find ways around to solve it (SingleTon, Virtual Constructor, ... Latest Answer : As long as no diamond problems (improper inheritance), single or multiple inheritance can all be proper inheritance. When usng multiple inheritance with diamond problem, you can use virtual inheritance to make the multiple inheritance a proper one. ... Tags : Inheritance what is inheritance? why we use it? plzz can anybody explain me with one example and where we use that concept? Latest Answer : The main use of inheritance is to provide reusability of codes .Through inheritance base class objects and functions are acquired by derived class so there is no need to specify it again in derived class ... Tags : Inheritance What is the danger of using public unsigned integers within a class?In a diamond-shaped inheritance hierarchy, how to ensure that only 1 copy of parent is created? Latest Answer : There are at least 2 questions here. The latter is answered but not the former.If the initial question is answered, there would be a requirement to highlight what the dangers are for both public unsigned and multiple inheritance. ... Tags : Inheritance Hi I very recently did the C++ online Quiz and was surprised to find that my answer (1) to the following question (below) was incorrect. Is there something I am missing here, or is the answer incorrect. Latest Answer : You can if the base class provides public or protected methods that modify its private data. Then derived class can expose this using access specifiers. ... Using inheritance, which of the following is not alloweda) Changing implementation of operation in parent by the subclassb) Using implementation of operation in parent class by the subclassc) Using attributes Latest Answer : We can override the implementation of parent class but we cannot change implementation from child class. So 'A' is not correct. ... Which one of the following statements regarding C++ class inheritance is FALSE?
a. Inheritance promotes generic design and code reuse.b. Struct cannot be inherited in C++.
c. C++ supports multiple Latest Answer : The only difference between a class and a struct is a class has private access and private inheritance by default and a struct has public access and public inheritance by default. The only place I'm aware of that you can't replace class with struct is ...
Sponsored Links
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||