Problem Statement
In Swift, which statement about structs is correct?
Explanation
In Swift, structs are value types. This means when you assign a struct instance to a new variable or pass it to a function, a copy is created. Thus changes in the new instance do not affect the original. This behaviour enhances safety and predictability for small-data models.
Practice Sets
This question appears in the following practice sets: