What is the difference between Class and Structure?
Answer Posted / navin
Structure: Initially (in C) a structure was used to bundle
different type of data types together to perform a
particular functionality. But C++ extended the structure to
contain functions also. The major difference is that all
declarations inside a structure are by default public.
Class: Class is a successor of Structure. By default all
the members inside the class are private.
| Is This Answer Correct ? | 182 Yes | 55 No |
Post New Answer View All Answers
What is the benefit of learning c++?
Is it possible to use a new for the reallocation of pointers ?
what is oops and list its features in c++?
What is constructor in C++?
Explain Memory Allocation in C/C++ ?
What is private public protected in c++?
What is the function of I/O library in C++ ?
Why main function is special in c++?
What is the operator in c++?
What does the ios::ate argument do?
Do you know about C++ 11 standard?
Why is swift so fast?
How can you tell what shell you are running on unix system?
What is the use of 'this' pointer?
What do you mean by delegate? Can a user retain delegates?