Answered Questions

  • What is public, protected, private?

    Public, protected and private are three access specifiers in C++. 1. Public data members and member functions are accessible outside the class.2. Protected data members and member functions are only available to derived classes.3. Private data members and member functions can’t be accessed outside the class. However there is an exception can be using friend classes.

    ankit

    • Jun 26th, 2015

    Can we use protected specifier first than public than private in a class definition in c++ by making class