The Big Three consists of which three from this list?

a. Default constructor
b. Copy constructor
c. Constructor with two parameters
d. destructor
e. Operator=

b) d) and e)
Explanation: The compiler will provide a do-nothing destructor, a copy members copy constructor and a copy members operator = if you don’t supply them. If you have dynamically allocated memory, you need all three. Here’s why. If you need a copy constructor it is because you have pointers to data allocated on the freestore without a copy constructor, just the pointers will be copied. The result of this will be evil. This means you have freestore allocated memory, which you must release, the automatic way to do that is with the destructor. These same reasons compel an overloading of operator=, since you will only get the pointers copied if you don’t provide an operator=.

Computer Science & Information Technology

You might also like to view...

A(n) ________ is a place on a computer where you attach a device to exchange data with the computer

Fill in the blank(s) with correct word

Computer Science & Information Technology

Value chain management focuses on the product, the process, and the end result

Indicate whether the statement is true or false

Computer Science & Information Technology