Question: 18. One of the main differences between the copy constructor and assignment operator when defined in the canonical form is: a. deleting old memory b.
18. One of the main differences between the copy constructor and assignment operator when defined in the canonical form is: a. deleting old memory b. allocating new memory c. copying data from one object to the other d. all of the above 19. The canonical form is necessary a. for all class definitions b. for class definitions containing a pointer data member c. for class definitions containing a reference data member d. for class definitions containins an object of a different class 30. Not implementing the canonical form when it is necessary would result in a. aliasing b. memory leaks c. dangling references d. all of the above
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
