Object Oriented Programming Using C++ – Section 2

6. The return type you code for all constructors is _____

A. void
B. the class type
C. the same type as the first data member defined in the class
D. no type

Correct Answer:  D. no type

7. When an object-oriented program detects an error within a function, the function _________

A. throws an exception
B. throws a fit
C. catches a message
D. catches an exception

Correct Answer:  A. throws an exception

8. Using a statement at the wrong time or with an inappropriate object creates a

A. logical error
B. syntax error
C. compiler error
D. language error

Correct Answer:  A. logical error

9. When you create a derived class and instantiate an object _____

A. the parent class object must be constructed first
B. the child class object must be constructed first
C. the parent class object must not be constructed
D. the child class object must not be constructed

Correct Answer:  A. the parent class object must be constructed first

10. Evaluate the following expression: 4 >6 || 10 < 2 * 6

A. True
B. False

Correct Answer:  A. True

Warning: Undefined variable $in_same_cat in /www/wwwroot/mtexam.com/public_html/wp-content/plugins/EXP.GKFEED.COM/function.php on line 27

Warning: Undefined variable $excluded_categories in /www/wwwroot/mtexam.com/public_html/wp-content/plugins/EXP.GKFEED.COM/function.php on line 27

Leave A Comment?