C++ Polymorphism
Polymorphism means having many forms. The word “poly” means many and “morphs” means forms, which means it is the way of performing some task in many ways. That means a single function or an operator functioning in many ways. It …
Polymorphism means having many forms. The word “poly” means many and “morphs” means forms, which means it is the way of performing some task in many ways. That means a single function or an operator functioning in many ways. It …
A copy constructor in C++ is used to create a copy of an already existed object. It is also used to Initialize one object from another of the same type. There are two types of copy constructor: Default Copy constructor …
As the name indicates, a C++ destructor destroys the object of a class as soon as the scope of an object ends. It is opposite to a constructor. When an object goes out of the scope, the compiler automatically calls …
In C++, a constructor is a special type of method that is called automatically when an instance of the class (object) is created. The compiler calls the constructor and is used to initialize the data members of a newly created …
C++ is an Object-Oriented Programming Language and classes and objects are the fundamental components of OOP’s. Everything in C++ is linked with classes and objects. The main purpose of C++ is to introduce the OOPs concept in the C programming language …
The main purpose of C++ is to introduce the OOPs concept in C programming language which is a powerful language. OOP is a concept of using objects in programming. It is a paradigm that uses objects and classes that aim …
Memory management refers to the process of managing the computer memory while assigning the space to the program’s variable to improve the overall performance. Requirement of Memory Management. We know that data in arrays are stored in a homogeneous way. …
As we know by now that a pointer stores the address of the pointed variable. But it is not the only use, pointer also stores the address of another pointer forming a chain like structure. When we defined the pointer …
A function is a user-defined block of codes that executes some specific task assigned to it invoked by its name. If there is an argument to be passed while calling a function then it is called actual arguments. There are …
We use a null pointer when we do not have the exact address to assign to a pointer. It is considered a good practice and null is assigned at the time of declaration. Therefore the pointer with a null value …