Computer Science - Object Oriented Programming Using C++

16. 

In a class specifier, data or functions designated private are accessible

A. to any function in the program
B. only if you know the password
C. to member functions of that class
D. only to public members of the class

Answer: Option C

Explanation:

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

17. 

When a function includes a throw statement for errors, the call to the potentially offending function should be placed within a _____ block

A. throw
B. try
C. catch
D. scope

Answer: Option B

Explanation:

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

18. 

The scope resolution operator is

A. a comma
B. a semicolon
C. a colon
D. two colons

Answer: Option D

Explanation:

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

19. 

"C++" is a _____ constant

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

Answer: Option D

Explanation:

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

20. 

In a C++ program, which of the following can be thrown?

A. scalar variables
B. programmer-defined objects
C. both (a) and (b)
D. neither (a) nor (b)

Answer: Option B

Explanation:

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