In C#, which of these is a value type by default?
- a
class Point { } - b
struct Point { }✓ - c
string - d
object
Explanation:
struct declares a value type in C# — instances are stored inline (on the stack, or inline inside whatever contains them) and are copied by value on assignment. class, string, and object are all reference types: variables of those types hold a reference to data on the heap.