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 a class? Explain with an example.
What is iterator in c++?
What is a far pointer? where we use it?
What are the advantages of using const reference arguments in a function?
How a macro differs from a template?
What are guid? Why does com need guids?
What is a static member?
You run a shell on unix system. How would you tell which shell are you running?
What does the linker do?
what is c++
What are formatting flags in ios class?
what is C++ exceptional handling?
Do inline functions improve performance?
What is a forward referencing and when should it be used?
What is dev c++ used for?