What are the differences between a struct and a class in
C++?
Answer Posted / ajit
In structures by default the member variables considered as
public where as in classes by default data members are
considered as private.
Structures doesn't provide the concept data encapsulation
but classes provides it.
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Is c++ map a hash table?
What is private public protected in c++?
What do you mean by inheritance in c++?
Does c++ support exception handling?
What is pure virtual function? Or what is abstract class?
What is a character in c++?
the maximum length of a character constant can be a) 2 b) 1 c) 8
What are structs in c++?
Difference between class and structure.
What are c++ templates used for?
Can I create my own functions in c++?
What are the uses of static class data?
Define a pdb file.
Does there exist any way to make the command line arguments available to other functions without passing them as arguments to the function?
What is a NULL Macro? What is the difference between a NULL Pointer and a NULL Macro?