6 years ago in C++ Inheritance

If a base class member access is public, and an inherited class accesses specifier is private, which of the following statement is true ?

[A] The base class member can be accessed by derived class objects
[B] The base class members cannot be accessed by the derived class members
[C] The derived class members can be accessed by the base class objects
[D] None of above
Loading...
Next Question

Overall Stats

Attempted 225
Correct 38
Incorrect 45
Viewed 142

Answers

Guest
Guest
Ayesha Waheed - 3 years ago

D. A is wrong because the base class member can be assessed by the derived class not its objects. This is the same for B. And base class objects can never access derived class members.

Ahmed Alanbagi
Ahmed Alanbagi - 1 week ago

Ahmed Alanbagi from Baghdad, Iraq is saying The derived class members can be accessed by the base class objects is correct answer

Rohit Tiwary
Rohit Tiwary - 3 weeks ago

Rohit Tiwary is saying The base class member can be accessed by derived class objects is correct answer

Avnish Indora
Avnish Indora - 3 weeks ago

Avnish Indora is saying The derived class members can be accessed by the base class objects is correct answer

Jonathan Reid
Jonathan Reid - 1 month ago

Jonathan Reid is saying None of above is correct answer

Related Questions

Choose most appropriate statement

  • [A] An abstract base class can have pure virtual destructor
  • [B] An abstract base class can have only virtual destructor
  • [C] An abstract base class can have non virtual destructor
  • [D] An abstract base class cannot have destructor

A base class will offer

  • [A] offer more specific objects than its derived classes
  • [B] correspond to something in the rest world
  • [C] behave badly when the chops are down
  • [D] be a generalized version of its derived classes

what is Hybrid Inheritance?

  • [A] multiple inheritance
  • [B] multilevel inheritance
  • [C] multipath inheritance
  • [D] combination of a and b
  • [E] combination of a and c

The conversion from basic data to class type can be done by .......

  • [A] Writing constructor
  • [B] Is not possible
  • [C] overloaded casting operator
  • [D] object of a class

Which of the following is false with respect to inheritance?

  • [A] When a base class is privately inherited,public members of the base class become private members of the derived class
  • [B] When a base class is publicly inherited,public members of the base class becomes public members of derived class
  • [C] When a base class is privately inherited,a private member of base class becomes private member of derived class
  • [D] When a base class is publicly inherited protected members of base class becomes protected members of derived class