Computer Science - Object Oriented Programming Using C++

6. 

The switch variable can be of

A. int type only
B. char type only
C. both int as well as char type
D. float type only
E. None of the above

Answer: Option C

Explanation:

No answer description available for this question. Let us discuss.

7. 

Reference variables and const class members _____

A. must be assigned values in any derived class
B. must never be initialized in a base class
C. must be initialized, rather than assigned values
D. must not exist if a class is to be a base class

Answer: Option C

Explanation:

No answer description available for this question. Let us discuss.

8. 

You can code a default exception handler by creating a catch block

A. with no arguments
B. with a void argument
C. with an ellipsis as its argument
D. with an argument identical to that thrown

Answer: Option C

Explanation:

No answer description available for this question. Let us discuss.

9. 

Which of the following are void functions?

A. main
B. pow
C. sqrt
D. All of the above

Answer: Option A

Explanation:

No answer description available for this question. Let us discuss.

10. 

Hiding individual components of an entry is _____

A. polymorphism
B. encapsulation
C. scaling
D. not recommended in C++

Answer: Option B

Explanation:

No answer description available for this question. Let us discuss.