As a part of my job, I interview potential candidates for jobs, and one of the standard questions I ask is ‘What is the difference between a class and a structure?’, and I sometimes am surprised with the kind of answers I get.
So, I decided, I should get some of these proper QnA’s for interview questions, and post them as a series.
|Storage||Stack||Heap (requires cleanup by GC)|
|Optimal size||> 16 bytes||< 16 bytes|
|Default protection level||Private||Public|
Misc references :