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

Related Articles

QA – Placement Quizzes | SP Contest 2 | Question 5

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

Select the statements that are true about default and copy constructors in C++:

  1. Compiler doesn’t create a default constructor if the user writes any constructor except the copy constructor.
  2. Compiler creates a copy constructor if the user doesn’t write its own copy constructor.
  3. Compiler doesn’t create a default constructor if the user writes any constructor even if it is copy constructor.

(A) 1 and 2
(B) Only 3
(C) Only 2
(D) 2 and 3


Answer: (D)

Explanation: https://www.geeksforgeeks.org/does-compiler-always-create-a-copy-constructor/

Quiz of this Question

My Personal Notes arrow_drop_up
Last Updated : 18 Jul, 2018
Like Article
Save Article
Similar Reads