What is 'Copy Constructor' and when it is called?
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 |
Copy Linked List using recursive function?
What is bubble sort c++?
What data encapsulation is in c++?
Why we use #include iostream in c++?
How to write Multithreaded applications using C++?
2 Answers Honeywell, TCS, Wipro,
What is pure virtual function?
How do you declare A pointer to function which receives an int pointer and returns a float pointer
What does the following code do: int c=0; cout< a) Undefined *Updated* b) 01 c) 00
What is scope in c++ with example?
What are static variables?
What is a custom exception?
What do you mean by public protected and private in c++?