Consider the following main function. Assume that DynamicWord.h contains a class definition for a class called DynamicWord that holds a pointer to a dynamic array as a private data member, but the assignment operator (=) has not been overloaded for this class.
#include "DynamicWord.h"
void main()
{
DynamicWord a;
DynamicWord b(a);
DynamicWord b = a;
}
Which of the above statements require(s) a copy constructor?
A. |
DynamicWord a; |
B. |
DynamicWord b(a); |
C. |
DynamicWord b = a; |