C++ MQCs with Explanation (CHAPTER 8: INHERITANCE : EXTENDING CLASSES

Which of the following functions can have access to the protected data of a class?

  1. A function that is friend of the class
  2. A member function of a class declared friend of the class
  3. A member function of a derived class
  4. All the above



Answer: 
Option d: All the above

Explanation Here

Post a Comment

0 Comments