Which statement best describes the relationship between base class and derived class types?

a. A derived class reference cannot be assigned to a base class variable and a base class
reference cannot be assigned to a derived class variable.
b. A derived class reference can be assigned to a base class variable and a base class
reference can be assigned to a derived class variable.
c. A base class reference can be assigned to a derived class variable, but a derived class
reference cannot be assigned to a base class variable.
d. A derived class reference can be assigned to a base class variable, but a base class reference cannot be assigned to a derived class variable.


d. A derived class reference can be assigned to a base class variable, but a base class reference cannot be assigned to a derived class variable.

Computer Science & Information Technology

You might also like to view...

Given the regular grammar: S -> aS | bS | a give the derivation for: abaaba: __________

What will be an ideal response?

Computer Science & Information Technology

A(n) ________ is a line bordering the chart plot area used as a frame of reference for measurement

Fill in the blank(s) with correct word

Computer Science & Information Technology

The Scrapbook allows you to store multiple items that you copy from a document. Explain how you can paste individual items on the Scrapbook into a separate document or documents.

What will be an ideal response?

Computer Science & Information Technology

When the student uses ________ the document will be displayed how the document would look with paragraph format applied

Fill in the blank(s) with correct word

Computer Science & Information Technology