C++ Programming - OOPS Concepts - Discussion
Discussion Forum : OOPS Concepts - General Questions (Q.No. 28)
28.
Which of the following functions are performed by a constructor?
Discussion:
12 comments Page 2 of 2.
Adeq said:
6 years ago
A constructor is a member function of a class that initializes objects of a class. In C++, Constructor is automatically called when an object(instance of class) is created.
So this is the first function that is automatically called after the creation of object.
So this is the first function that is automatically called after the creation of object.
Kanak Agrawal said:
4 years ago
The constructor is used to initialize an object.
And a object is created using "new".
So, option D is correct.
And a object is created using "new".
So, option D is correct.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers