/* */ Click to Join Live Class with Shankar sir Call 9798158723

What is Default constructor ?


A constructor which is not take any argument is called zero argument constructor.or also knows as Default constructor. all object of a class with default constructor are initialize to same set of value.

Q.) Example of Default constructor .
    
    #include < iostream>  
using namespace std;  
class Employee  
 {  
   public:  
        Employee()    
        {    
            cout<<"Shineskill"<< endl;    
        }    
};  
int main(void)   
{  
    Employee e1; //creating an object of Employee   
    Employee e2;   
    return 0;  
}  
Output
Shineskill
Shineskill