Explain default constructor. What is a default constructor?

What is a default constructor?

- Default constructor is the constructor with no arguments or all the arguments has default values.
- Default constructors are called during default initializations and value initializations.

Syntax:
<class_name>()
{

}

Example:
class A
{
   A()
   {
       //statements;
   }
}
What is abstraction?
What is abstraction? - The process of hiding unnecessary data and exposing essential features is called abstraction....
C++-what-is-overriding.aspx
Overriding - Defining a function in the derived class with same name as in the parent class.
What is copy constructor? - C++
Copy constructor - A copy constructor is a special type of constructor that is used to create an object...
Post your comment