What is the difference between Class and Structure?

Answer Posted / ravi kumar jain

The difference between a class and a structure is that, by
default, all of the members of a class are private and, by
default, all of the members of a structure are public.The
difference between a class and a structure is that, by
default, all of the members of a class are private and, by
default, all of the members of a structure are public.

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the static member function.

708


Which is not a valid keyword a) public b) protected c) guarded

740


What are the different types of comments allowed in c++?

575


what kind of projects are suitable for c and c++

623


In a function declaration what does extern means?

593






How does atoi function work?

624


Which is the best c++ software?

606


What is function overloading c++?

570


What is the need of a destructor? Explain with the help of an example.

566


What is difference between c++ and c ++ 14?

573


What is the equivalent of Pascal's Real a) unsigned int b) float c) char

582


Why is polymorphism useful?

563


Explain pass by value and pass by reference.

592


write a corrected statement in c++ so that the statement will work properly. x = y = z + 3a;

1453


If a round rectangle has straight edges and rounded corners, your roundrect class inherits both from rectangle and from circle, and they in turn both inherit from shape, how many shapes are created when you create a roundrect?

667