Answer Posted / richa
A copy constructor is used in 3 cases.They are listed below:
a)When an object is created from another object of the same
type.
b)When an object is passed by value as a parameter to a
function.
c)When an object is returned from a pointer.
| Is This Answer Correct ? | 38 Yes | 9 No |
Post New Answer View All Answers
How would you implement a substr() function that extracts a sub string from a given string?
What are the advantages of using a pointer?
What you know about structures in C++?
Why do we need pointers?
Do you need a main function in c++?
Write a C++ Program to check whether a number is prime number or not?
State two differences between C and C++.
What jobs can you get with a c++ certification?
What is polymorphism & list its types in c++?
What is code reusability in c++?
What is setw manipulator in c++?
Explain bubble sorting.
Explain what are mutator methods in c++?
What is exception handling? Does c++ support exception handling?
What are references in c++? What is a local reference?