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

Is html an oop?

777


if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?

3112


What is solid in oops?

806


What does enum stand for?

858


What is difference between inheritance and polymorphism?

772


What are benefits of oop?

872


How do you use inheritance in unity?

796


just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.

6708


Give two or more real cenario of virtual function and vertual object

2075


What makes a language oop?

817


What is this pointer in oop?

788


What is a null tree?

857


Can bst contain duplicates?

941


What is pointer in oop?

727


How is class defined?

825