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

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    3 × five =