5 years ago in C++ Inheritance

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
Loading...
Next Question

Overall Stats

Attempted 176
Correct 25
Incorrect 65
Viewed 86

Answers

Guest
Guest
Deep
Deep - 1 month ago

Deep from Kolkata, India is saying It can access only derived class members is correct answer

Zunaira jafar
Zunaira jafar - 3 months ago

Zunaira jafar from Hafizabad, Pakistan is saying Both base class & derived class members is correct answer

Mohamed Ibrahim
Mohamed Ibrahim - 3 months ago

Mohamed Ibrahim from Palestine is saying It can access only derived class members is correct answer

indhuja indhuja
indhuja indhuja - 4 months ago

indhuja indhuja from Erode, India is saying Both base class & derived class members is correct answer

Apu Sen
Apu Sen - 6 months ago

Apu Sen from Nageswari, Bangladesh is saying It can access only base class members is correct answer

Related Questions

Which design patterns benefit from the multiple inheritance?

  • [A] Adapter and observer pattern
  • [B] Code pattern
  • [C] Glue pattern
  • [D] None of the mentioned

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

Which of the following is/are false

  • [A] Inheritance is deriving new class from existing class
  • [B] In an inheritance, all data and function members of base class are derived by derived class
  • [C] We can specify which data and function members of base class will be inherited by derived class
  • [D] We can add new functions to derived class without recompiling the base class

What is meant by multiple inheritance?

  • [A] Deriving a base class from derived class
  • [B] Deriving a derived class from base class
  • [C] Deriving a derived class from more than one base class
  • [D] None of the mentioned

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