virtual destructors must be used when:
a. The constructor in the base class is virtual.
b. delete is used on a base-class pointer to a derived-class object.
c. delete is used on a derived-class object.
d. A constructor in either the base class or derived class is virtual.
b. delete is used on a base-class pointer to a derived-class object.
Computer Science & Information Technology
You might also like to view...
What is the value of result after the following code executes?
int a = 60; int b = 15; int result = 10; if (a = b) result *= 2; a. 10 b. 120 c. 20 d. 12 e. code will not execute
Computer Science & Information Technology
Suppose A has a public no-arg constructor. To create an anonymous object from a class A, it is better to use __________.
a. new A b. A c. new A() d. A() Key:d
Computer Science & Information Technology