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 size is allocated to the union variable?
How long does it take to get good at leetcode?
Write a function to perform the substraction of two numbers. Eg: char N1="123", N2="478", N3=-355(N1-N2).
Define a conversion constructor?
What does std :: flush do?
What is boyce codd normal form in c++?
What is the function to call to turn an ascii string into a long?
What is the use of :: operator in c++?
What is the difference between method overloading and method overriding in c++?
Can we inherit constructor in c++?
Difference between class and structure.
What is the use of typedef?
List different attributes in C++?
What is the return value of the insertion operator?
Explain Memory Allocation in C/C++ ?