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 apps are written in c++?

598


Explain rtti.

586


What is a standard template library (stl)? What are the various types of stl containers?

661


Who created stl?

641


What is stl in c++ with example?

628






Explain static and dynamic memory allocation with an example each.

634


What is an incomplete type in c++?

760


which feature are not hold visual basic of oop?

1717


Explain what happens when a pointer is deleted twice?

729


Which operations are permitted on pointers?

562


How long it will take to learn c++?

608


what are the decision making statements in C++? Explain if statement with an example?

648


Is c++ a difficult language?

566


Out of fgets() and gets() which function is safe to use and why?

719


What is the real life example of polymorphism?

601