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) Copy constructor , d) destructor , and e) Operator=

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...

What is meant by the format of a cell?

What will be an ideal response?

Computer Science & Information Technology

The ! operator is an unary operator.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology