Home / Object Oriented Programming / Write the situation when copy constructor must be used?

Write the situation when copy constructor must be used?

Write the situation when copy constructor must be used?

  • When an object of the class is returned by value.
  • When an object of the class is passed by values as an argument.
  • When an object is constructed based on another object of the same class.
  • When compilers generates a temporary objects.