Ch11_Questions

Ch11_Questions - negative infinity, or Not-a-Number (NaN)....

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
C# Programming: From Problem Analysis to Program Design , 2nd edition ISBN 1423901460 Chapter 11 1. c. Exceptions 2. b. an unhandled exception is thrown 3. c. throwing an exception 4. a. placed in a try block 5. a. System.FormatException 6. e. none of the above 7. d. System.DivideByZeroException 8. d. System.DivideByZeroException, System.ArithmeticException, and System.Exception 9. b. IOException 10 c. has the same effect as catch (System.Exception) { } 11. d. compiler and runtime 12. b. Compiler 13. a. authoritative source for C# grammar Doyle: C#, 2nd edition ISBN 1423901460    Page 1-1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
14. d. do a single-step through an application 15. e. breakpoint 16. c. an exception is thrown 17. a. e.Message 18. d. Step Through 19. d. Step Over is used when you are inside a function call and want to return to the calling function 20. e. Exception 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 reported as either positive infinity,
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: negative infinity, or Not-a-Number (NaN). The Selection statements can not be used to test for equality with floating point values; thus, it is necessary to do a relational test using an if statements. For example the test might be if (divisor < .000000001) with floating point values. 22. a. casting error x = (int) "aValue"; These are thrown for errors in arithmetic, casting or conversion. b. if a method has the following signature: public void aMethod ( ) and you try to call it as follows: aMethod(35); Doyle: C#, 2nd edition ISBN 1423901460 Page 1-2 This exception is thrown when the format of an argument does not meet the parameter specifications of the invoked method. c. int [ ] a = new int[5]; System.Console.WriteLine(a[20]); Doyle: C#, 2nd edition ISBN 1423901460 Page 1-3...
View Full Document

Page1 / 3

Ch11_Questions - negative infinity, or Not-a-Number (NaN)....

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online