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

1. Suppose an exception of type E is thrown in a function but not listed in the exception specification, and is not caught in the function. The exception will be caught in a calling function that has a catch block that declares an exception of that type.

2. Compilers will check code in functions against exception specifications.


1. False
Explanation: If such an exception is thrown, it will not be caught by any catch block in the program. Rather, the unexpected() function will call that will terminate your program unless you do something with set_unexpected or set_terminate (not treated in the text.)
2. False
Explanation: Some C++ compilers attempt this (Borland), but in general in C++, this must be done at runtime.

Computer Science & Information Technology

You might also like to view...

The output of the encryption function is fed back to the shift register in Output Feedback mode, whereas in ___________ the ciphertext unit is fed back to the shift register.

A. Cipher Block Chaining mode B. Electronic Codebook mode C. Cipher Feedback mode D. Counter mode

Computer Science & Information Technology

Assuming that x = 2 and y = 3, what does each of the following statements display?

``` a) System.out.printf("x = %d%n", x); b) System.out.printf("Value of %d + %d is %d%n", x, x, (x + x)); c) System.out.printf("x ="); d) System.out.printf("%d = %d%n", (x + y), (y + x)); ```

Computer Science & Information Technology

Match the following terms to their meanings:

I. gridlines II. syntax III. argument IV. documenting V. borders A. the order of arguments in a function B. additional or replacement lines in a worksheet C. values that Excel uses to evaluate a function D. providing information about a worksheet E. appear on the screen but not on printouts

Computer Science & Information Technology

You have a spreadsheet containing the sales figures for every sale that has taken place in your organization. The spreadsheet includes the sales person's name, the customer's name, the date of the sale, the amount of the sale, as well as the highest and lowest priced items from the sale. Your supervisor has asked you to print out a version of the spreadsheet that only contains sales that are greater than $25,000.00. How can you accomplish his request?

What will be an ideal response?

Computer Science & Information Technology