What is Copy Constructor?




Answer Posted / swetcha

The purpose of a copy constructor is to initialize a new
object of a given class by copying an existing object of
that class.

Is This Answer Correct ?    61 Yes 3 No






Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does it mean to declare a member variable as static?

67


Why struct is used in c++?

35


How to call a non virtual function in the derived class by using base class pointer

3800


What is lazy initialization in c++?

7


How do you differentiate between overloading the prefix and postfix increments?

45






What is the best c c++ compiler for windows?

27


Why iomanip is used in c++?

29


What is a constant reference?

56


What is an arraylist c++?

4


What is srand c++?

36


What is class invariant in c++?

108


Can I learn c++ without knowing c?

28


How can you quickly find the number of elements stored in a static array?

72


Can we override main method?

28


What do you mean by volatile and mutable keywords used in c++?

59