Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Q5.Write a simple program to perform default constructor.
- //Solution:-
- #include <iostream>
- using namespace std;
- class Employee
- {
- public:
- Employee()
- {
- cout<<"Default Constructor Invoked"<<endl;
- }
- };
- int main(void)
- {
- Employee e1; //creating an object of Employee
- Employee e2;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement