What is 'Copy Constructor' and when it is called?



What is 'Copy Constructor' and when it is called?..

Answer / hrpynux@gmail.com

A copy constructor is called when an object is passed by value. Copy constructor itself is a function. So if we pass an argument by value in a copy constructor, a call to copy constructor would be made to call copy constructor which becomes a non-terminating chain of calls.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

Define a program that reads two matrices of size 3x3 with real values from the user then prints their sum, difference and multiplication.

0 Answers   TCS,


Eplain extern keyword?

0 Answers  


What is ios in c++?

0 Answers  


What are the uses of pointers?

0 Answers  


Can we declare destructor as static? Explain?

3 Answers  






Define basic type of variable used for a different condition in C++?

0 Answers  


What are structs in c++?

0 Answers  


Are vectors faster than arrays?

0 Answers  


What is isdigit c++?

0 Answers  


Is vector a class in c++?

0 Answers  


What return value must conversion operators have in their declaration?

0 Answers  


What is the difference between C and CPP?

0 Answers   iNautix,


Categories