Page 1-1
C# Programming: From Problem Analysis to Program Design, 5th edition
Chapter 12
1. d. Exceptions
2. c. throwing an exception
6. e. none of the above
7. d. DivideByZeroException
8. d. DivideByZeroException, ArithmeticException, and
Exception
15. e. breakpoint
16. c. an exception is thrown
21. Division by zero involving floating-point operands does not throw an exception.
Exceptions are only thrown for integral or integer data types. The result of division by zero is
22. casting error ─ x = (int) “aValue”;
These are thrown for errors in arithmetic, casting or conversion.
23. If a method has the following signature: public void aMethod ( ) and you try to call it as
Page 1-3
24. int [ ] a = new int[5];