Object Oriented Programming Using C++ – Section 2


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

11. A constructor always has

A. communicational cohesion
B. temporal cohesion
C. logical cohesion
D. no cohesion

Correct Answer:  B. temporal cohesion
Advertisement

12. A normal C++ operator that acts in special ways on newly defined data types is said to be

A. glorified
B. encapsulated
C. classified
D. overloaded

Correct Answer:  D. overloaded
Advertisement

13. A function in a derived class that has the same name as a function in the parent class

A. will override the base class function
B. will cause an error message to display
C. will be overridden by the base class function
D. will execute immediately often the base class function executes

Correct Answer:  A. will override the base class function
Advertisement

14. In which statements, does a ‘continue’ statements cause the control to go directly to the test condition and then continue the looping process?

A. ‘for’ and ‘while’
B. ‘while’ and ‘if-else’
C. ‘do-while’ and ‘if-else’
D. ‘while’ and ‘do-while’
E. None of the above

Correct Answer:  D. ‘while’ and ‘do-while’
Advertisement

15. Which of the following statements is false?

A. You typically use a public member function to change the value in a private data member
B. Because the constructor function does not return a value, you place the keyword void before the constructor’s name
C. The public member functions in a class can be accessed by any program that uses an object created from that class
D. An instance of a class is considered an object

Correct Answer:  B. Because the constructor function does not return a value, you place the keyword void before the constructor’s name
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?