Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

when can we use copy constructor?

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


Please Help Members By Posting Answers For Below Questions

How do you invoke a base member function from a derived class in which you’ve overridden that function?

1174


What is array give example?

1110


What is one dimensional array in c++?

1180


What is binary object model?

1099


What is a character in c++?

1093


What is function prototyping? What are its advantages?

1152


How the delete operator differs from the delete[]operator?

1154


What do you mean by early binding?

1133


what is C++ objects?

1247


What is data abstraction? How is it different from data encapsulation?

1054


What is constructor in C++?

1148


What does the nocreate and noreplace flag ensure when they are used for opening a file?

1176


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?

1585


Explain virtual class and friend class.

1105


Can we use this pointer in a class specific, operator-overloading function for new operator?

1150