What is the role of copy constructor in copying of thrown objects?



What is the role of copy constructor in copying of thrown objects?..

Answer / Shobhit Jain

The copy constructor plays a crucial role when it comes to copying exception objects. Since exceptions can be user-defined classes, they also need to be copied during exception propagation. The copy constructor is used to create an exact copy (including state) of the thrown object.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What is atoi?

1 Answers  


What is c++ iterator?

1 Answers  


Write about the members that a derived class can add?

1 Answers  


How long will it take to learn programming?

1 Answers  


Explain overriding.

1 Answers  


Can comments be nested?

1 Answers  


What is a class template in c++?

1 Answers  


What is the difference between std::vector and std::list

1 Answers  


Explain the concept of copy constructor?

1 Answers  


Differentiate between an array and a list?

1 Answers  


How can I disable the "echo" feature?

1 Answers  


Describe the advantage of an external iterator.

1 Answers  


Categories