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 ?    63 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is coupling in oop?

767


Which is not a valid keyword a) public b) protected c) guarded

992


Is C++ case sensitive a) False b) Depends on implementation c) True

799


what is pre-processor in C++?

801


What is the main purpose of c++?

775


What character terminates all character array strings a) b) . c) END

957


How does a C++ structure differ from a C++ class?

850


List the types of polymorphism in c++?

838


What is lazy initialization in c++?

828


When should overload new operator on a global basis or a class basis?

816


Can comments be nested?

805


How the memory management in vectors are being done. What happens when the heap memory is full, and how do you handle it ?

2056


If all is successful, what should main return a) 0 b) 1 c) void

780


Explain what happens when an exception is thrown in C++.

704


When does a name clash occur in c++?

911