Tuesday, September 4, 2012

What is Constructor ?


Constructor is a member function with the same name as its class.

1] Constructor is a special type of function because its name is same as class name.
2] Constructor calls itself when instance of that class is called.
3] There r three type of constructor which r copy, default, parameterized constructor
4] its allocate memory when it called.
5]The constructor member function should not return a value.

No comments:

Post a Comment