SwiftCapgeminiinterview report
How optional chaining behaves
When you chain several optional accesses like this and hit nil partway through, what happens?
let city = user?.address?.cityHow optional chaining behaves
When you chain several optional accesses like this and hit nil partway through, what happens?
let city = user?.address?.citySwiftMultiple choiceIntro
Which of these unwrap an optional safely? Pick all that apply.
#optional
SwiftMultiple choiceIntro
Given let view: UIView = UILabel(), which of these casts can crash at runtime?
#optional
SwiftShort answerIntro
Why does Swift have optionals?
#optional
SwiftMultiple choiceIntro
Which of these three lines compile? Pick all that apply. …
#optional