Explain the difference between class and struct in C++?
|1.||Members of Class are Private||Members of Class are Public|
|2.||Declared as Class||Declared as Struct|
|3.||Used for a more significant amount of Data||Used for a smaller amount of Data|
|4.||Supports Inheritance||Does not support Inheritance|
|5.||The object is created on the Heap memory||The objective is formed on the Stack Memory|
Suggest An Answer
No suggestions avaliable!