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...


What is the Diffrence between a "assignment operator" and a
"copy constructor"?

Answers were Sorted based on User's Feedback



What is the Diffrence between a "assignment operator" and a "copy constructor"?..

Answer / kishore

Copy constructors are used during class object
initialization and assignment operators are invoked during
object assignment.

XYZ c;
XYZ Obj = c; -> invoke copy constructor
XYZ d;
d = c; -> invoke assignment operator

Is This Answer Correct ?    7 Yes 0 No

What is the Diffrence between a "assignment operator" and a "copy constructor"?..

Answer / bheda govind

Assignment operater are types,
(1)simple
(2)compond a+=5
(3)expresion a=a+b

Is This Answer Correct ?    1 Yes 0 No

What is the Diffrence between a "assignment operator" and a "copy constructor"?..

Answer / dee

assignment operator copies the values of one object to
another of the same class.It will excute only when the
right side of the variable is object and two sides are not
equal.It does shallow copy

Copy constructor craetes the object if its not existing and
copies the values of another object of the same class and
it does the deep copy.

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More C++ General Interview Questions

What is the operator in c++?

0 Answers  


Hi i need to Acess a variable "int Intval" in the below mentioned code .How to Access it guys i am waiting for your reply

3 Answers  


i want the NIC programmer-B model papaer pattren, iwant the all model papers?

15 Answers   NIC,


Difference between struct and class in terms of access modifier.

0 Answers  


What compiler was used?

6 Answers   Intel,


How would you differentiate between a pre and post increment operators while overloading?

0 Answers  


Which software is best for coding?

0 Answers  


Is there a datatype string in c++?How is the memory allocation?

3 Answers  


Show the application of a dynamic array with the help of an example.

0 Answers  


what is data abstraction in C++?

0 Answers  


How to give an alternate name to a namespace?

0 Answers  


Will c++ be replaced?

0 Answers  


Categories