Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PICK AN OPTION: 1) Given the following function defintion, what happens if the function throws the exception? void f1() throw(double) { if( //some code here)

PICK AN OPTION:

1) Given the following function defintion, 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 exeption which is passed to the calling code. c. the function will cause the program to exit d. the code has a syntax error

2) If class A is derived from class B. and a virtual function in class B throws an exception, then the overridden version of that function in class A must a. not throw any exceptions b. have an exception specification that is a subset of the exception specification of the base class B c. not throw any exceptions that the function in class B might throw d. all the above

3) A class that is used for exceptions is declared a. differently from other classes b. specialized only for exceptions c. may not have objects declared of that class d. all the above e. none of the above

4) Which of the following code fragments are illega? a. try { try { //other code here } catch(int e) { //code here } } catch(float e) { //code here } b. try { //code here } catch(int e) { //code here try { //code here } catch(string e) { } } c. all of the above d. none of the above

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Visual Basic 6 Databases

Authors: Charles Williams

1st Edition

1861002025, 978-1861002020

More Books

Students also viewed these Databases questions