What is Copy Constructor?

Answer Posted / naveen kumar

The copy constructor is a constructor which creates an object by initializing it with an object of the same class, which has been created previously.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you achieve runtime polymorphism?

560


How to get the current position of the file pointer?

546


Is it possible to use a new for the reallocation of pointers ?

588


What do the keywords volatile and mean mutable?

597


What is overriding vs overloading?

571






What does and I oop mean in text?

609


class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash

1685


What are the types of array in c++?

608


What is polymorphism in c++? Explain with an example?

596


How do I make turbo c++ full screen?

577


What is the standard template library (stl)?

611


What is public, protected, private in c++?

640


Is overriding possible in c++?

565


What would happen on forgetting [], while deallocating an array through new?

624


What are the defining traits of an object-oriented language?

680