Answer Posted / namitha
A copy constructor is used in the following cases.
-When an object is created from another object of the same
type.
-When an object is passed by value as a parameter to a
function.
-When an object is returned from a pointer.
-when we want to set a default value for the data members.
| Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
Which is not a valid keyword a) public b) protected c) guarded
How can an improvement in the quality of software be done by try/catch/throw?
How are Structure passing and returning implemented by the compiler?
Is empty stack c++?
Write about the stack unwinding?
What are the various compound assignment operators in c++?
Is c++ a pure oop language?
If you push the numbers (in order) 1, 3, and 5 onto a stack, which pops out first a) 1 b) 5 c) 3
Which format specifier is used for printing a pointer value?
What is lazy initialization in c++?
What is c++ best used for?
What are static and dynamic type checking?
What is c++ array?
Are there any special rules about inlining?
Explain storage qualifiers in c++.