Answer Posted / sagarson
Copy constructors are called in following cases:
a) when a function returns an object of that class by value
b) when the object of that class is passed by value as an
argument to a function
c) when you construct an object based on another object of
the same class
d) When compiler generates a temporary object
| Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
What is the difference between prefix and postfix versions of operator++()?
Is c++ a good beginners programming language?
Why can templates only be implemented in the header file?
what are the iterator and generic algorithms.
Is c better than c++?
What's the order in which the local objects are destructed?
Why main function is special in c++?
Comment on assignment operator in c++.
Can you be able to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?
What are virtual constructors/destructors?
What are the various storage classes in C++?
What is std :: flush?
Write a program which uses Command Line Arguments
What are the syntactic rules to be avoid ambiguity in multiple inheritance?
What are manipulators in c++ with example?