What is the difference between Class and Structure?
Answer Posted / prince rupela
1.Structure is Value Type. Class is a reference type.
2.Structure Contain Data Member. Class Contain Data Member And Member Function.
3.In Structure Data Members are By Default Public. In Class Data Member are By Default Private
4.Structure can not Inherit. Structure can Inherit.
5.There is no Data Hiding Feature in Structure. In Class There is Data Hiding features like Public,Private, Protected.
6.A Structure Can't Abstract . Class can.
7.Structure both use c and c++. class only c++ and oops language.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Does c++ support multilevel and multiple inheritances?
Is c++ the best programming language?
What is the main function c++?
What is general format for a prototype?
Explain mutable storage class specifier.
What is a dynamic binding in c++?
Explain what happens when a pointer is deleted twice?
what is data encapsulation in C++?
Why is main function important?
How do I get good at c++ programming?
What are c++ storage classes?
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?
What is virtual destructor ans explain its use?
Write bites in Turbo c++ Header ("Include") Files.
If you hear the cpu fan is running and the monitor power is still on, but you did not see anything show up in the monitor screen. What would you do to find out what is going wrong?