Differentiate between structure and class in C++.

Sharad Jaiswal
Written by Sharad Jaiswal

Posted On: Aug 26, 2018


    1 Answer Written

  •  Sharad Jaiswal
    Posted by Robert Bottorff

    The only difference between a struct and class is that a struct's members default public, and a class defaults private. There is no other technical difference.

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..

Ask a Question