1.Inheritance is oops feature by which we can use the methods and functions of base class
2.Single Inheritance the type of inheritance where there is onl...
We use Abstract class and interface to enforce some rules to the classes which extends/implements. For example we can define a class say "Bird" and we can d...
Using virtual destructors, you can destroy objects without knowing their type - the correct
destructor for the object is invoked using the virtual function mec...
Virtual functions are implemented using a table of function pointers, called the vtable.
There is one entry in the table per virtual function in the class. Thi...
When you define only function prototype in a base class without and do the complete implementation in derived class. This base class is called abstract class an...
Slicing means that the data added by a subclass are discarded when an object of the subclass is passed or returned by value or from a function expecting a base...
1. Overload - two functions that appear in the same scope are overloaded if they have the same name but have different parameter list
2. main() cannot be ove...
Yes, but it's generally not a good idea. The mechanics of object construction in .NET are quite different from C++, and this affects virtual method calls in con...
Polymorphism is also achieved through interfaces. Like abstract classes, interfaces also describe the methods that a class needs to implement. The difference be...
When you want to inherit (use the functionality of) another class. Example: With a base class named Employee, a Manager class could be derived from the Employee...