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 multimap sorted c++?
Why the usage of pointers in C++ is not recommended ?
What is null and void pointer?
What are manipulators in c++ with example?
What is the difference between structure and class?
How do you generate a random number in c++?
What's the order in which the objects in an array are destructed?
What is #include cstdlib in c++?
Which ide is best for c++?
What are the various compound assignment operators in c++?
What is operator overloading in c++ example?
What is a Default constructor?
Is c++ proprietary?
Should the member functions which are made public in the base class be hidden?
What is the role of C++ shorthand's?