iOS Swift - Swift Language Essentials
Which statement correctly describes the difference between
struct and class in Swift?struct and class in Swift?struct is a value type, meaning it is copied when assigned or passed around. class is a reference type, meaning instances share the same reference.struct is a value type and class is a reference type. correctly states the difference. struct supports inheritance but class does not. is wrong because struct does not support inheritance. class is copied on assignment but struct is shared. reverses the behavior. struct can only have stored properties, class cannot. is false because class can have stored properties.struct is a value type and class is a reference type. -> Option B15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions