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
Differentiate between an external iterator and an internal iterator? What is the advantage of an external iterator.
What is a literal in c++?
Which bit wise operator is suitable for putting on a particular bit in a number?
What is name hiding in c++?
What do you mean by static variables?
I want explanation for this assignment: how to connect mysql database using c/c++,please explain this detailly?
Why do we use templates?
What do c++ programmers do?
Is it possible to get the source code back from binary file?
Is c++ primer good for beginners?
When does a 'this' pointer get created?
What is a local variable?
What is long in c++?
What is meant by a delegate?
Should I learn c or c++ or c#?