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

Can main method override?

0 Answers  


why c++ is called OOPS? waht is inherutance? what is compiler?

5 Answers  


What is difference between data abstraction and encapsulation?

0 Answers  


Are polymorphisms mutations?

0 Answers  


Finding of the 4 larger (bigger) numbers from the list like{1245,4587,2145,1163,29987,65783.....}

1 Answers   Wipro,






Write 7 differences between "Public" function and "Private" function?

2 Answers   IBM, Wipro,


Can private class be inherited?

0 Answers  


Precompilation ?

1 Answers   emc2,


Given two strings like x=?hello? and y=?open?, remove any character from string x which is also used in string y, thus making the result x=?hll?.

13 Answers   IBM,


How do you explain polymorphism?

0 Answers  


assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).

0 Answers  


write a c++ code to overload + and - for a stack class such that + provides push and - provides pop operation

1 Answers   College School Exams Tests, HCL, IBM, TCS,


Categories