92.5k views
4 votes
C++
Is there any difference between Class and Structure? Prove with the help of example.

User Sindhu S
by
5.0k points

2 Answers

5 votes
The class is reference type (it is a pointer and is assigned on the heap), structure and value type (and is allocated on the stack). The difference is important in terms of memory management.
User Josh Beam
by
3.9k points
3 votes

Answer:

5555

Step-by-step explanation:

User Cyborg
by
5.0k points