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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we use polymorphism?

653


What type of loop is a for loop?

777


What is the significance of classes in oop?

677


What is oops concept with example?

658


Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer

1750






Can we define a class within the interface?

665


What causes polymorphism?

673


What is the importance of oop?

698


What is object in oop?

782


What is object in oop with example?

820


hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.

1617


Explain the advantages of inheritance.

757


Are polymorphisms mutations?

797


What is class in oop with example?

704


What is difference between pop and oop?

700