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
Explain selection sorting. Also write an example.
What is the type of this pointer in c++?
Which sort does c++ use?
Explain stack & heap objects?
What are references in c++? What is a local reference?
What is a sequence in c++?
Can the operator == be overloaded for comparing two arrays consisting of characters by using string comparison?
What is the oldest programming language?
How do you clear a set in c++?
Explain how functions are classified in C++ ?
What are the effects after calling the delete this operator ?
Which is the best c++ compiler for beginners?
What does ios :: app do in c++?
What is implicit conversion/coercion in c++?
Out of fgets() and gets() which function is safe to use?