Which of the following is not a disadvantage of default memberwise copy with objects containing pointers?
a. Having the possibility of leaving a dangling pointer.
b. Allowing both objects to point to the same dynamically allocated storage.
c. Allowing the destructor of one object to be called while leaving the second pointer, to the same memory location, intact.
d. Requiring the explicit overloading of the assignment operator.
d. Requiring the explicit overloading of the assignment operator.
You might also like to view...
Which of the following is not true of class template vector?
a. The size of a vector can be changed after it is declared. b. A vector can be assigned to another vector by using the assignment operator. c. A vector object can be initialized with a copy of another vector by invoking the copy constructor. d. A vector can store only data of type int.
Access ________ retrieve information from tables and enable you to sort, search, and limit the data to just those records that you want to see
A) Tables B) Queries C) Forms D) Reports
Software that acts as a translator, which enhances the capabilities of the operating system by enabling it to communicate with hardware.
A. Device driver B. Firmware C. Swap file
The definition
char string1[] = "first"; is equivalent to: a) character string1[] = {'f', 'i', 'r', 's', 't', '\0'}; b) char string1 = {'f', 'i', 'r', 's', 't', '\0'}; c) char string1[] = {'f', 'i', 'r', 's', 't'}; d) char string1[] = {'f', 'i', 'r', 's', 't', '\0'};