Object Oriented Programming Using C++ – Section 5

16. The number 125.35 is a _____

A. character literal constant
B. numeric literal constant
C. string literal constant
D. variable

Correct Answer: B. numeric literal constant

17. When a class serves as a base class to others, _____

A. all of its members are inherited
B. all of its members are inherited, except for any private members
C. all of its members are inherited, except for any protected members
D. None of its members is inherited unless specifically “listed

Correct Answer: B. all of its members are inherited, except for any private members

18. Storing a class definition in a separate file is an example of

A. polymorphism
B. name mangling
C. implementation hiding
D. inheritance

Correct Answer: C. implementation hiding

19. Which is true?

A. Sequential cohesion is slightly weaker than functional cohesion
B. Sequential cohesion is slightly stronger than functional cohesion
C. Sequential cohesion is much stronger than functional cohesion
D. Neither sequential cohesion nor functional cohesion is stronger than the other

Correct Answer: A. Sequential cohesion is slightly weaker than functional cohesion

20. A class named student must have a constructor whose name is

A. student
B. ~student
C. constructor
D. any legal C++ name.

Correct Answer: A. student

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?