When copy constructor can be used?

Answer Posted / jack

while compiler encounters following situation it uses the CC
1.when assigning one object to another object of same class
type

2.When an object is passed to the called function.....

3.when a function returns the object type and assigns it to
the another object..........

Is This Answer Correct ?    18 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are register variables?

650


What is anonymous object in c++?

632


What is a binary file? List the merits and demerits of the binary file usagein C++.

732


What is the difference between ++ count and count ++?

589


How the memory management in vectors are being done. What happens when the heap memory is full, and how do you handle it ?

1841






What are the advantage of using register variables?

643


Explain the properties and principles of oop.

533


What is implicit conversion/coercion in c++?

657


What are the different types of comments allowed in c++?

581


what kind of projects are suitable for c and c++

631


What do you mean by “this” pointer?

619


Which sort is best for the set: 1 2 3 5 4 a) Quick Sort b) Bubble Sort c) Merge Sort

664


What is the this pointer?

637


Why c++ is faster than java?

601


why is iostream::eof inside a loop condition considered wrong?

596