What is the difference between Class and Structure?
Answer Posted / vandana mishra
Class is much broader,real world applicable 1-1-1: concept whereas structure is a primitive concept with poor internal organisation.
2: structure contains only data while class bind both data & member functions.
3: class provide data hiding,inheritance etc but structure didn't.
4: if we not define constructor in class there constructor automaticly invoke but in structure it does not happen automaticly.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain what are single and multiple inheritances in c++?
If dog is a friend of boy, and terrier derives from dog, is terrier a friend of boy?
What is ios class in c++?
What are the advantages of using pointers in a program?
What are the differences between java and c++?
Is ca high or low level language?
How the delete operator differs from the delete[]operator?
What is rvalue?
What would happen on forgetting [], while deallocating an array through new?
Define vptr.
What is the difference between c++ and turbo c++?
How does atoi function work?
Differentiate between a constructor and a method in C++.
How would you call C functions from C++ and vice versa?
What is setw manipulator in c++?