Object Oriented Programming Using C++ – Section 7


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

46. The break statement is

A. a preprocessor directive
B. an operator in the C++ language
C. a keyword in the C++ language
D. switch in the C++ language
E. None of the above

Correct Answer:  C. a keyword in the C++ language
Advertisement

47. A variable w with a value 67 may be defined with _______

A. int w = 67;
B. int w(67);
C. int 67(w);
D. both (a) and (b), but not (c).

Correct Answer:  D. both (a) and (b), but not (c).
Advertisement

48. An expression contains relational, assignment and arithmetic operators. In the absence of parentheses, the order of evaluation will be

A. assignment, relational, arithmetic
B. arithmetic, relational, assignment
C. relational, arithmetic, assignment
D. assignment, arithmetic, relational
E. None of the above

Correct Answer:  B. arithmetic, relational, assignment
Advertisement

49. The keyword virtual indicates that

A. a derived class has public access to a base class
B. more than one base class exists
C. a base class should be used only once in inheritance
D. a derived class should have more than one base class constructed

Correct Answer:  C. a base class should be used only once in inheritance
Advertisement

50. If you declare two objects as Customer firstCust, secondCust; which of the following must be true?

A. Each object will store a separate copy of any static member data
B. Each object will store a separate copy of any member functions
C. Each object will store a separate copy of any nonstatic data members
D. You cannot declare two objects of the same class

Correct Answer:  C. Each object will store a separate copy of any nonstatic data members
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?