What is the difference between Class and Structure?
Answer Posted / anshu sharma
Structure are value types and classes are reference types.So
structures use stack and classes use heap.
Structures members can not be declared as protected , but
class members can be.
You can not do inheritance in structures.
Structures do not require constructors while classes require
Is This Answer Correct ? | 158 Yes | 54 No |
Post New Answer View All Answers
What are virtual constructors/destructors?
Can there be at least some solution to determine the number of arguments passed to a variable argument list function?
What is the difference between a declaration and a definition?
Why c++ is the best language?
describe private access specifiers?
Can you please explain the difference between using macro and inline functions?
Why do we need runtime polymorphism in c++?
When you overload member functions, in what ways must they differ?
What is the difference between ++ count and count ++?
Can we declare a base-class destructor as virtual?
What is a c++ map?
How do you add an element to a set in c++?
Does c++ support multilevel and multiple inheritances?
How many static variables are created if you put one static member into a template class definition?
What is meant by the term name mangling in c++?