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

Do vectors start at 0?

0 Answers  


Should the this pointer can be used in the constructor?

0 Answers  


What are the advantages of c++ over c?

0 Answers  


What is const in c++?

0 Answers  


List out function which we can call without using object

1 Answers  






Refer to a name of class or function that is defined within a namespace?

0 Answers  


Is c++ the hardest programming language?

0 Answers  


Implement strcmp

3 Answers   Bloomberg, Citadel,


write a program that a 5 digit number and calculates 2 power that number and prints it.

2 Answers   Vimukti Technologies,


Evaluate !(1&&1||1&&0) a) Error b) False c) True

0 Answers  


Explain all the C++ concepts using examples.

0 Answers   InterGraph,


What is compilation?

1 Answers   Datamatics, TCS,


Categories