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 is jump statement in C++?
What are arrays c++?
What is abstraction in c++ with example?
Write a code/algo to find the frequency of each element in an array?
What are the important differences between c++ and java?
What is a string example?
What is the basic structure of a c++ program?
Describe the advantages of operator overloading?
List the types of polymorphism in c++?
What is data structure in c++?
What is a node class in c++?
What is class and structure in c++?
What is the role of static keyword for a class member variable?
Does c++ have finally?
Is c++ the hardest language?