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
How do you invoke a base member function from a derived class in which you’ve overridden that function?
What is array give example?
What is one dimensional array in c++?
What is binary object model?
What is a character in c++?
What is function prototyping? What are its advantages?
How the delete operator differs from the delete[]operator?
What do you mean by early binding?
what is C++ objects?
What is data abstraction? How is it different from data encapsulation?
What is constructor in C++?
What does the nocreate and noreplace flag ensure when they are used for opening a file?
If we want that any wildcard characters in the command line arguments should be appropriately expanded, are we required to make any special provision? If yes, which?
Explain virtual class and friend class.
Can we use this pointer in a class specific, operator-overloading function for new operator?