Enables the initialization of an object - Constructor

Q.  C++: A constructor
- Published on 24 Jun 15

a. Constructs new data type
b. Enables the initialization of an object as it is created
c. Obtain memory for a new variable
d. None of the above

ANSWER: Enables the initialization of an object as it is created
 
Enables the initialization of an object as it is created
Explanation: Constructors are special class functions which performs on initialization of every object. It has the same name as the class name

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)