Given the following function definition, what happens if the function throws the exception?

void f1( ) throw (double)
{
if( //some code here)
throw 12;
}
a. the 12 will be converted to 12.0
b. the function will throw an integer exception which is passed to the calling code.
c. the function will cause the program to exit
d. this code has a syntax error

c. the function will cause the program to exit

Computer Science & Information Technology

You might also like to view...

The following program purports to sum all entered int values that are greater than 5. It compiles without any error message, and it executes without error message, but nevertheless is wrong. Name all the errors.

``` // Display the sum of all entered int values // greater than 5 #include int main() { using namespace std; int x, sum; while (x < 10) { cin >> x; if (x > 5); sum = sum +x; } cout << “The sum is values > 5 is “ << sum << endl; ``` a) The while header needs a semicolon at the end of its line. b) The semicolon at the end of the if statement is an error that the compiler should catch. c) The semicolon at the end of the if statement causes all entered values to be summed. d) The sum variable is not initialized, so the output value is most likely garbage.

Computer Science & Information Technology

You cannot change the stacking order of layers.

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

Computer Science & Information Technology