26. If an exception is thrown and no catch block matches the type of the thrown parameter, then _____

A. the program terminates
B. the first catch block is executed
C. the last catch block is executed
D. the program proceeds with the code following the catch blocks


Correct Answer:  A. the program terminates

27. The comma operator (,) is used to

A. permit two different expressions to appear in situations where only one expression would ordinarily be used
B. terminate loops or to exit from switch
C. alter the normal sequence of program execution by transferring control to some other part of the program
D. carry out a logical test and then take one of two possible actions, depending upon the outcome of the test
E. None of the above


Correct Answer:  A. permit two different expressions to appear in situations where only one expression would ordinarily be used

28. A function that is called automatically each time an object is created is a(n)

A. constructor
B. contractor
C. builder
D. architect


Correct Answer:  A. constructor

29. Which of the following statements creates a named constant called driverAge whose value is 16?

A. const driverAge = 16;
B. const short driverAge = 16;
C. driverAge =16;
D. driverAge const =16;
E. namedconst driverAge =16;


Correct Answer:  B. const short driverAge = 16;

30. Which functions do not have a this pointer?

A. access functions
B. inspector functions
C. member functions
D. static functions


Correct Answer:  D. static functions

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    four × 5 =