What is the difference between Class and Structure?
Answer Posted / sudip das.
The difference between a CLASS and STRUCTURE are that:
1) CLASS are reference type where as STRUCTURE are value type.
2)By default,all of the members of a CLASS are private, but all of the members of a STRUCTURE are public.
3)CLASSES use heap but STRUCTURE use stuck.
4)CLASS members can be declared as protected but STRUCTURE members can not be.
5)CLASS contain data members and member function, but a STRUCTURE is contain only data member.
Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
Why should we use null or zero in a program?
Will the following program execute?
What is an inclusion guard?
What is do..while loops structure?
Is java easier than c++?
Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?
What is the difference between #import and #include?
What is a manipulative person?
What is abstraction in c++?
Define what is constructor?
What is #include ctype h in c++?
What is virtual destructor ans explain its use?
Is oops and c++ same?
How much is c++ certification?
the first character in the variable name must be an a) special symbol b) number c) alphabet