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
Does c++ support exception handling?
Describe new operator?
What is a stack? How it can be implemented?
What is the use of this pointer in c++?
total amount of milk produced each morning and then calculates and outputs the number of cartons needed for this milk , the cost of producing the milk and the profit from producing this milk.
What is math h in c++?
List the special characteristics of constructor.
How can we read/write Structures from/to data files?
How do you write a function that can reverse a linked-list?
What is a template in c++?
the first character in the variable name must be an a) special symbol b) number c) alphabet
Show the declaration for a pointer to function returning long and taking an integer parameter.
What is ios in c++?
What is the advantage of c++ over c?
When there is a global variable and local variable with the same name, how will you access the global variable?