Consider the following inheritance in C++ class BASE: class BASE { int B1;…
Navodaya Vidyalaya Samiti 2022
Consider the following inheritance in C++ class BASE: class BASE { int B1; protected: int B2; public: ____ ____ void FUNB(); }; class DERIVED : public BASE { int D1; public: ____ ____ }; What will be the visibility modes of B2 and FUNB() in the derived class DERIVED?
- A.
B2 → protected, FUNB() → public
- B.
B2 → protected, FUNB() → protected
- C.
B2 → public, FUNB() → public
- D.
B2 → private, FUNB() → protected
Attempted by 501 students.
Sign up free to check your answer
Sign up freeLoading lesson…

