Why does the ADT stack implementation of the push function leave to the calling function the responsibility to detect and respond to an overflow?

A. Because it is easier that way.
B. Because we cannot assume that heap overflow is an error. That decision belongs to the application.
C. Because it improves the performance of the function.
D. Because ADTs cannot handle errors.


Answer: B

Computer Science & Information Technology

You might also like to view...

Print a screenshot of a Web page you haven’t used before and mark it up as you try to understand what it is and how to use it. Write down brief thoughts (as on pages 12 and 13 of the book) to show the things that you “get” immediately and the things that cause question marks to form over your head. Be prepared to share your example with the class.

What will be an ideal response?

Computer Science & Information Technology

Describe a situation where it would be beneficial to create a standalone macro.

What will be an ideal response?

Computer Science & Information Technology

What does FTP stand for?

A. File Trade Protocol B. Fixed Trade Protocol C. File Transfer Protocol D. Fixed Transfer Protocol

Computer Science & Information Technology

____ form images by spraying tiny drops of liquid ink onto the page, one printed line at a time.

A. Laser printers B. Ink-jet printers C. Dot-matrix printers D. Line printers

Computer Science & Information Technology