Which of the following assignments would be a compilation error?

a. Assigning the address of a base-class object to a base-class pointer.
b. Assigning the address of a base-class object to a derived-class pointer.
c. Assigning the address of a derived-class object to a base-class pointer.
d. Assigning the address of a derived-class object to a derived-class pointer.


b. Assigning the address of a base-class object to a derived-class pointer.

Computer Science & Information Technology

You might also like to view...

In a producer/consumer relationship with a single cell of shared memory, which of the following is true?

a. The consumer must run first. b. The producer must run first. c. The producer must run first or the consumer will have to wait. d. The consumer must run first or the producer will have to wait.

Computer Science & Information Technology

If X is a pointer variable, then the location assigned by the compiler for X is its (L-value, R-value, signature) ______.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

When specifying a trigger action for an Alarm Definiton, what two alarm state changes are available to be triggered on? (Choose two)

a. From normal to critical b. From critical to warning c. From critical to normal d. From normal to warning

Computer Science & Information Technology

In designing a link based implementation of the stack, what standard exception did the author decide to ignore?

a. bad_alloc b. logic_error c. PrecondViolatedExcep d. nullPtrError

Computer Science & Information Technology