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 does it mean to declare a member variable as static?
What does iomanip mean in c++?
How can you quickly find the number of elements stored in a dynamic array?
Discuss the effects occur, after an exception thrown by a member function is unspecified by an exception specification?
What is null pointer and void pointer?
What is a class template?
Explain how an exception handler is defined and invoked in a Program.
Write about all the implicit member functions of a class?
Why do we use classes in programming?
How does c++ structure differ from c++ class?
Why do we learn c++?
What is the best free c++ compiler for windows?
Explain selection sorting. Also write an example.
What is else syntax in c++?
Explain the auto storage classes in c++.