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
What are the classes in c++?
What is the purpose of templates in c++?
What is the use of volatile variable?
How does the copy constructor differ from the assignment operator (=)?
Is c++ vector a linked list?
Explain storage qualifiers in c++.
Write a program using display() function which takes two arguments.
find the two largest values among the 6 numbers using control structures : do-while,for,if else,nestedif- else ,while. one or two of them.
Can we use struct in c++?
How is c++ used in the real world?
What are the advantages of using const reference arguments in a function?
List the special characteristics of constructor.
Who created c++?
What is meant by entry controlled loop?
Define a nested class.