if u write a class do u write Assignment operator and copy
constructor



if u write a class do u write Assignment operator and copy constructor..

Answer / sachin

Compiler provide the assignment operator/ copy constructor
by default. The assignment operator and copy constructor do
the bit wise copy of the object. If user want to do the
member wise copy(ex:allocating the memory from the heap)
for the members, one can write his/her own assignment
operator/ copy constructor.

Is This Answer Correct ?    11 Yes 0 No

Post New Answer

More OOPS Interview Questions

What is overriding in oops?

0 Answers  


What are oops functions?

0 Answers  


What is a template?

7 Answers  


What is the default size allocated for array in the statement if size not specified " int a[] "

4 Answers   CTS,


There are 2 empty jars of 5 and 3 liters capacity. And a river is flowing besides. I want to measure 4 liters of wanter using these 2 jars. How do you do this?

2 Answers  






Why static functions always uses static variables?

3 Answers  


Can we override main method?

0 Answers  


What is design patterns in C++?

2 Answers   Persistent,


What is abstraction example?

0 Answers  


Can abstract class have normal methods?

0 Answers  


What is sub classing in c++?

1 Answers  


Why do pointers exist?

0 Answers  


Categories