FRESHERSHOME![]() |
This is a discussion on In which scenario assignment operator and copy constructor used?Interview question? within the Interview/Resume Tips forums, part of the Career Forum category; mainly in Telecomm domain...
| |||||||
| Notices |
| Interview/Resume Tips Calm down yourself before your critical Test/Interview.. Be equipped with a good resume before you start. Discuss all your queries Here.. |
![]() |
| | Thread Tools | Display Modes |
|
#1
| |||
| |||
| mainly in Telecomm domain
__________________ Powered by Yahoo! Answers |
|
#2
| |||
| |||
| Consider obj1=obj2 where obj1 & obj2 are the objects of same class Here Assignment operator assigns the refernce of object obj2 to the memory location of obj1 Copy constructor is user defined hence in case of copy constructor it is supposed that it accept the reference to existing object retrive values of its fields then create new object initialise the fields of new object with retrived values & then return reference
__________________ Powered by Yahoo! Answers |
|
#3
| |||
| |||
| assignment is default member wise copy....... when this default behaviour is not required ..use copy constructor...to tune up copy procedure
__________________ Powered by Yahoo! Answers |
![]() |
| Tags |
| which, scenario, assignment, operator, copy, constructor, usedinterview, question |
| Thread Tools | |
| Display Modes | |
|
|
Sitemap
Jobs by Location: Advertising and Marketing Jobs - IT Software Jobs - Walk-in Jobs - BPO Jobs - Government Jobs - Sales / BD Jobs - Tele Communication Jobs App Programming - Network Admin
Jobs By Location: Jobs in Bangalore - Jobs In India - Jobs in Delhi - Jobs in Hyderabad - Jobs in Kochi - Jobs in Mumbai - Jobs in Trivandrum - Jobs in pune - Jobs in Jonida - Jobs in Chennai - Jobs in Coimbator
Jobs Type: Full Time Jobs - Part Time Jobs
Latest Jobs - Accounting Jobs - Engineering Jobs - IT Jobs - Walkins - How to Face Interview - HR Round Tips - Career Info - Guide For Freshers - Apply for Jobs - Future Studies - Jobs Forums - Freshers IT Software Salary Details