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 lambda expression c++?
Can constructor be private in c++?
Write a program which uses functions like strcmp(), strcpy()? etc
If I is an integer variable, which is faster ++i or i++?
Which is the best c++ compiler?
What is a wchar_t in c++?
Is python better than c++?
What is the fastest c++ compiler?
Where Malloc(), Calloc(), and realloc() does get memory?
Is c++ a pure oop language?
Name the debugging methods that are used to solve problems?
What is a Default constructor?
What is a dangling pointer in c++?
Should I learn c or c++ or c#?
If all is successful, what should main return a) 0 b) 1 c) void