Object Oriented Programming Using C++ – Section 5

1. If no constructors can be specified for a derived class, objects of the derived class will use the constructors in the base class

A. True
B. False

Correct Answer: A. True

2. The get() function returns _____

A. a character
B. void
C. a reference to the object that invoked it
D. a copy of the object that invoked it

Correct Answer: C. a reference to the object that invoked it

3. The most efficient data type for a variable that the number 20000 is the _____ data type

A. Character
B. Double
C. Float
D. Long Integer
E. Short Integer

Correct Answer: E. Short Integer

4. The number 5.5e3 is a _____ constant

A. character literal
B. named literal
C. numeric literal
D. string literal

Correct Answer: C. numeric literal

5. The compiler determines the type used in a template function via ___________

A. the name of the function
B. the first variable declared within the function
C. the type of the argument passed to the function
D. the type of the value returned from the function

Correct Answer: C. the type of the argument passed to the function

Leave A Comment?

16 − fifteen =