Object Oriented Programming Using C++ – Section 9


Warning: Undefined variable $ext in /www/wwwroot/gkfeed.com/public_html/wp-content/plugins/show-hidecollapse-expand/bg_show_hide.php on line 281

Warning: Undefined variable $ext in /www/wwwroot/gkfeed.com/public_html/wp-content/plugins/show-hidecollapse-expand/bg_show_hide.php on line 281

Warning: Undefined variable $ext in /www/wwwroot/gkfeed.com/public_html/wp-content/plugins/show-hidecollapse-expand/bg_show_hide.php on line 281

Warning: Undefined variable $ext in /www/wwwroot/gkfeed.com/public_html/wp-content/plugins/show-hidecollapse-expand/bg_show_hide.php on line 281

Warning: Undefined variable $ext in /www/wwwroot/gkfeed.com/public_html/wp-content/plugins/show-hidecollapse-expand/bg_show_hide.php on line 281

6. A function that is called automatically each time an object is destroyed is a

A. constructor
B. destructor
C. destroyer
D. terminator

Correct Answer:  B. destructor
Advertisement

7. We can output text to an object of class ofstream using the insertion operator « because

A. the ofstream class is a stream
B. the insertion operator works with all classes
C. we are actually outputting to cout
D. the insertion operator is overloaded in ofstream

Correct Answer:  D. the insertion operator is overloaded in ofstream
Advertisement

8. The operator that allocates new memory is _____

A. allocate
B. mem
C. new
D. next

Correct Answer:  C. new
Advertisement

9. A comment

A. is a note that can be put into the source code
B. is ignored by the compiler.
C. starts with the /* character pair
D. All of the above
E. None of the above

Correct Answer:  D. All of the above
Advertisement

10. Which of the following is(are) valid identifier(s)?

A. record_1
B. 1 record
C. return
D. $tax
E. None of the above

Correct Answer:  A. record_1
Advertisement

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

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

Leave A Comment?