Domanda di colloquio di Daffodil Software

What is the difference between Stucture and Class?

Risposte di colloquio

Anonimo

18 nov 2017

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

3

Anonimo

19 mag 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