What is Copy Constructor?

Answer Posted / srikanth kanchari

Copy constructor is created by the compiler if you dont
Create, but it does shallow Copy of the Object so there is
a need to create a copy constructor by the Developer to
make deep copy of the object.

Normally it will be

Class A
{
A();
A(A&);// copy constructor
};

Is This Answer Correct ?    19 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between a mixin and inheritance?

508


What is use of overloading?

598


Differentiate between late binding and early binding. What are the advantages of early binding?

568


What is void pointer in c++ with example?

588


What is class and object with example?

578






What are the advantages of early binding?

599


What is multilevel inheritance?

713


What is #include iostream?

727


What is the difference between a type-specific template friend class and a general template friend class?

545


Which is best c++ or java?

604


What are the new features that iso/ansi c++ has added to original c++ specifications?

574


If you don’t declare a return value, what type of return value is assumed?

533


describe private access specifiers?

626


What is the maximum value of a unsigned char a) 255 b) 256 c) 128

620


What is an arraylist c++?

675