Daffodil Software interview question

What is the difference between Stucture and Class?

Interview Answers

Anonymous

18 Nov 2017

Members of a class are private by default and members of struct are public by default.

3

Anonymous

19 May 2018

A structure is a value type so it is stored on the stack, but a class is a reference type and is stored on the heap. A structure doesn't support inheritance, and polymorphism, but a class supports both.

4