When should base class members be declared protected?

a. When all clients should be able to access these members.
b. When these members are used only by member functions of this base class.
c. When these members should be available only to derived classes (and friends), but not to other clients.
d. The protected access specified should never be used.

c. When these members should be available only to derived classes (and friends), but not to other clients.

Computer Science & Information Technology

You might also like to view...

A superclass contains all the fields and methods of its subclasses as well as its own more specific fields and methods.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Write an algebraic expression for the statement given below. Let represent the unknown quantity. The product of a number and -5 increased by 8.

What will be an ideal response?

Computer Science & Information Technology