5 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 173
Correct 36
Incorrect 42
Viewed 95

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.

deadpool
deadpool - 3 weeks ago

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

Deep
Deep - 1 month ago

Deep from Kolkata, India is saying The base class member can be accessed by derived class objects is correct answer

udit kumar
udit kumar - 3 months ago

udit kumar is saying The derived class members can be accessed by the base class objects is correct answer

indhuja indhuja
indhuja indhuja - 4 months ago

indhuja indhuja from Erode, India is saying The base class members cannot be accessed by the derived class members is correct answer

Related Questions

When a base class pointer points to derived class object?

  • [A] It can access only base class members
  • [B] It can access only derived class members
  • [C] Both base class & derived class members
  • [D] None

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 symbol is used to create multiple inheritance?

  • [A] Dot
  • [B] Comma
  • [C] Dollar
  • [D] None of the mentioned

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

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