Explain what is class definition in C++ ?

devquora
devquora

Posted On: Feb 22, 2018

 

A class describes the behavior and properties common to any particular type of object. It is a user-defined data type, which holds its own data members and member functions, which can be accessed and used by creating an instance of that class. Defining a class means defining a blueprint for a data type or an object. A class definition begins with the keyword class followed by the class name and the class body, which is enclosed by a pair of curly braces. A class definition must always be followed either by a semicolon or a list of declarations for it to be valid.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    C++ Interview Questions

    Explain what is OOP?

    Object-oriented programming (OOP) is a type of computer programming, also more commonly known as software design, in wh..

    C++ Interview Questions

    What is the difference between #import and #include in C++?

    The statement #include is used in C++ to include the source file or import the header files containing definitions of f..

    C++ Interview Questions

    What is ‘this’ pointer?

    The ‘this’ pointer is passed as a hidden argument to all the non-static member method calls and is available as a l..