Object Oriented Programming Using C++ – Section 10


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

1. The main difference in operation between an ‘if statement and a ‘while’ statement is

A. the ‘while’ loop body is executed
B. the body of the ‘while’ statement may be executed many times, the body of the ‘if statements only once
C. the conditional expression following the keyboard is evaluated differently
D. All of the above
E. None of the above

Correct Answer:   B. the body of the ‘while’ statement may be executed many times, the body of the ‘if statements only once
Advertisement

2. If a class object is thrown with a throw statement, then a subsequent catch block has a usable match if the type of the catch argument is_________

A. a parent class of the thrown class
B. a child class of the thrown class
C. either (a) or (b)
D. neither (a) nor (b)

Correct Answer:  A. a parent class of the thrown class
Advertisement

3. The weakest form of cohesion is

A. coincidental
B. functional
C. logical
D. communicational

Correct Answer:  A. coincidental
Advertisement

4. The ‘continue’ statement 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 a switch
C. alter the normal sequence of program execution by transferring control to some other part of the program
D. All of the above
E. None of the above

Correct Answer:  E. None of the above
Advertisement

5. The ‘break’ statement is used to exist from

A. a do loop
B. a for loop
C. a switch statement
D. All of the above
E. None of the above

Correct Answer:  D. All of the above
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?