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

  • What is a class?

    Class is a user-defined data type in C++. It can be created to solve a particular kind of problem. After creation the user need not know the specifics of the working of a class.  

    Star Read Best Answer

    Editorial / Best Answer

    Answered by: hirma

    • Sep 18th, 2005


    class is a userdefined datatype which consists of attributes(datamembers) and behavior(member functions).Bydefault the members of a class is private.

    Nikita

    • Jan 23rd, 2018

    Class is a user define data type which contains the variable and function which r of two type private and public where the public class members can be accessed from any other class but the private cla...

    Atul

    • Dec 18th, 2017

    Class is same as structure in C, but in Class we have functions