Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

C++ | Constructors | Question 1

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

Which of the followings is/are automatically added to every class, if we do not write our own.
(A) Copy Constructor
(B) Assignment Operator
(C) A constructor without any parameter
(D) All of the above


Answer: (D)




 

Explanation: In C++, if we do not write our own, then compiler automatically creates a default constructor, a copy constructor and a assignment operator for every class.

My Personal Notes arrow_drop_up
Last Updated : 04 Jan, 2013
Like Article
Save Article
Similar Reads