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 the types of pointer?
What is a unnitialised pointer?
Does improper inheritance have a potential to wreck a project?
What are shallow and deep copy?
What are all predefined data types in c++?
What does new in c++ do?
How do you master coding?
What is virtual table?
What is singleton class in c++?
How do you declare a set in c++?
How do you establish an is-a relationship?
Why c++ is the best language?
Which bit wise operator is suitable for putting on a particular bit in a number?
Do class declarations end with a semicolon?
Why do we need function?