Which of the following are events that a programmer would want to throw an exception to manage?

a. A power failure (presumably in the absence of a UPS -- an Uninterruptable Power Supply).
b. A user enters a name too long for the C-string buffer, threatening a buffer overflow.
c. A disk drive fails
d. Operator new fails to find sufficient memory in the free store to satisfy a call.
e. Someone inadvertently presses the reset button on the front of the machine.


Parts b) and d) are situations that the exception facility was designed to manage.
Explanation: The exception facility was designed to manage unusual but predictable events, not unpredictable events such as power failure, hardware failure or someone pressing reset.

Computer Science & Information Technology

You might also like to view...

Which of the following is not an advantage of using cloud services?

A) maintenance and upgrades are performed by provider B) consistency over multiple platforms C) full control over hardware and software D) All of the above.

Computer Science & Information Technology

There are various ways to prepare sterile media, but a common method is to write ____ to every block on the device to erase any previous contents and then, if needed, format the device with a file system.

A. blank spaces B. zeros C. ones D. bit-streams

Computer Science & Information Technology

________ is content that integrates text and media

Fill in the blank(s) with correct word

Computer Science & Information Technology

Which of the following table names would appear in Design view to indicate a table being used in a self-join relationship and distinguish it from the first instance of the table in the relationship?

A. 1_tblPatient B. tblPatient2 C. tblPatient_1 D. 1tblPatient

Computer Science & Information Technology