What is the difference between Class and Structure?
Answer Posted / mohanraj.d
1.structure is a value type.but class is a reference type.
2.structure is stored in stack.but class is stored in heap.
3.struct cannot have default constructor.
4.struct do not support inheritance.
5.class can inherit from a class.
6.struct cannot have declare destructor.
7.class has define object and function.
8.structure has define only object.
| Is This Answer Correct ? | 50 Yes | 28 No |
Post New Answer View All Answers
Do you know what is overriding?
What is an orthogonal base class in c++?
How much do c++ programmers make?
Describe delete operator?
Explain the static member function.
Where Malloc(), Calloc(), and realloc() does get memory?
Tell me what are static member functions?
What is virtual base class uses?
Perform addition, multiplication, subtraction of 2-D array using Operator Overloading.
Explain abstraction.
What is the v-ptr?
Is c++ a programming language?
List the features of oops in c++?
What is the benefit of encapsulation?
explain the reference variable in c++?