Answer the following questions true (T) or false (F)

1. Downcasting causes the slicing problem.

2. In C++, a virtual destructor is invoked whenever a virtual constructor was used to create the object.


1. false
Explanation: A downcast is the conversion of a Base* to a Derived*, where the derivation of Derived from Base is pubic. It requires the dynamic_cast. It is used when the client programmer hopes the Base* points to an object that really is a Derived object. Downcasting is dangerous. For further discussion of this topic see the text on page 649.
2. False
Explanation: The keyword virtual cannot be applied to a constructor. There is a virtual constructor idiom. (see p291, Cline, Lomow, and Girou, C++ FAQs, AWL ISBN 0-201-30983-1) There are very necessary virtual destructors.
>>Same story. Not in text. Have to cut

Computer Science & Information Technology

You might also like to view...

Only one from a given set of options can be selected at a time.

a. Hidden fields b. Select boxes c. Radio buttons d. Password box e. Checkboxes f. Email, telephone, and URL input types

Computer Science & Information Technology

Once a custom slide show has been created and/or hidden slides created, the presentation must be saved

Indicate whether the statement is true or false

Computer Science & Information Technology

Specifying or isolating an area of your photo for editing is called making a ____.

a. selection b. choice c. frame d. none of the above

Computer Science & Information Technology

When connecting to a host via SSH for the first time, the user is prompted to accept the encryption fingerprint for the target computer which is stored in ___________ in the ~/.ssh/ directory.

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

Computer Science & Information Technology