Questions
- Which statement about reference types is false?
a) Reference types are stored on the heap. b) Reference types can always be subclassed. c) Reference types can conform to multiple protocols.
- Which statement about value types is true?
a) Value types are stored on the heap. b) Value types can always be subclassed. c) Values types can conform to multiple protocols.
- What does heap allocation mean?
a) An object allocated on the heap is stored at a fixed place in memory. b) An object allocated on the heap is stored with a variable size in RAM memory. c) It means that an object is stored in an optimized location.
- You should always use a struct for your data models. True or false?
a) True, because you don't need inheritance. b) False, it depends on whether your models have an identity. c) False, because data models should always be subclassed.
- What keyword should you add to a function that mutates a property on a struct?
a) mutates
.
b) mutating
.
c) updates
.
- Which type of object is not allocated on...