What is the difference between Class and Structure?
Answer Posted / ramesh.alavala
class provides data hiding,structures doesn't provide.
class support polymorphism,structures doesn't support.
classes by default are inherited by privately,structures are
inherited by publicly.
classes can be abstract, structures can't be abstract.
| Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
Can the operator == be overloaded for comparing two arrays consisting of characters by using string comparison?
What does #define mean in c++?
Incase of a function declaration, what is extern means?
What are virtual functions in c++?
Is c++ a difficult language?
What is a Default constructor?
What is virtual base class uses?
What is anonymous object in c++?
Which command properly allocates memory a) char *a=new char[20]; b) char a=new char[20]; c) char a=new char(20.0);
What is the use of string in c++?
Give an example of run-time polymorphism/virtual functions.
Can there be at least some solution to determine the number of arguments passed to a variable argument list function?
What c++ is used for?
How to declare a function pointer?
What are the different types of polymorphism in c++?