Define a constructor - What it is and how it might be called (2 methods).

Define a constructor - What it is and how it might be called (2 methods).

Constructor is atype of member function in the class, with the name of the function being the same as the class name. It also specifies how the object should be initialized.

There are two Ways of calling constructor:
> Automatically by complier when an object is created. It is called a Implicitly method.
> Calling the constructors explicitly is possible, but it makes the code unverifiable.

By:Umang
Date:2006-01-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related C Subjective Links

C Subjective interview questions and answers for experienced and fresher