15 Optionals questions from the Swift bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.
Free to start: the 2-minute IT readiness check — six questions and a result.
A.an operator that supplies a default fallback when the left-hand wrapped value is empty
B.a type that either holds a value or is nil, written with a trailing question mark
C.a statement that unwraps a value and exits the current scope early when the value is absent
D.a construct that conditionally unwraps a wrapped value into a new constant only when it is present
Answer + AI explanation with Pro
2. Which term means: "a type that either holds a value or is nil, written with a trailing question mark"?
Junior
A.Optional binding with if let
B.Optional
C.nil
D.Nil-coalescing operator (??)
Answer + AI explanation with Pro
3. Which statement is correct?
Junior
A.Optional — a type that either holds a value or is nil, written with a trailing question mark
B.Optional — the keyword representing the absence of a value for a type that may be empty
C.Optional — a statement that unwraps a value and exits the current scope early when the value is absent
D.Optional — an operator that supplies a default fallback when the left-hand wrapped value is empty
Answer + AI explanation with Pro
4. What is nil?
Junior
A.an operator that supplies a default fallback when the left-hand wrapped value is empty
B.a type that either holds a value or is nil, written with a trailing question mark
C.a construct that conditionally unwraps a wrapped value into a new constant only when it is present
D.the keyword representing the absence of a value for a type that may be empty
Answer + AI explanation with Pro
5. Which term means: "the keyword representing the absence of a value for a type that may be empty"?
Junior
A.Nil-coalescing operator (??)
B.Optional
C.guard let
D.nil
Answer + AI explanation with Pro
6. Which statement is correct?
Junior
A.nil — an operator that supplies a default fallback when the left-hand wrapped value is empty
B.nil — a construct that conditionally unwraps a wrapped value into a new constant only when it is present
C.nil — the keyword representing the absence of a value for a type that may be empty
D.nil — a statement that unwraps a value and exits the current scope early when the value is absent
Answer + AI explanation with Pro
7. What is Optional binding with if let?
Mid
A.a statement that unwraps a value and exits the current scope early when the value is absent
B.a type that either holds a value or is nil, written with a trailing question mark
C.an operator that supplies a default fallback when the left-hand wrapped value is empty
D.a construct that conditionally unwraps a wrapped value into a new constant only when it is present
Answer + AI explanation with Pro
8. Which term means: "a construct that conditionally unwraps a wrapped value into a new constant only when it is present"?
Mid
A.Nil-coalescing operator (??)
B.Optional binding with if let
C.guard let
D.Optional
Answer + AI explanation with Pro
9. Which statement is correct?
Mid
A.Optional binding with if let — a type that either holds a value or is nil, written with a trailing question mark
B.Optional binding with if let — the keyword representing the absence of a value for a type that may be empty
C.Optional binding with if let — a statement that unwraps a value and exits the current scope early when the value is absent
D.Optional binding with if let — a construct that conditionally unwraps a wrapped value into a new constant only when it is present
Answer + AI explanation with Pro
10. What is guard let?
Mid
A.an operator that supplies a default fallback when the left-hand wrapped value is empty
B.a construct that conditionally unwraps a wrapped value into a new constant only when it is present
C.a statement that unwraps a value and exits the current scope early when the value is absent
D.the keyword representing the absence of a value for a type that may be empty
Answer + AI explanation with Pro
11. Which term means: "a statement that unwraps a value and exits the current scope early when the value is absent"?
Mid
A.guard let
B.Optional binding with if let
C.Nil-coalescing operator (??)
D.nil
Answer + AI explanation with Pro
12. Which statement is correct?
Mid
A.guard let — the keyword representing the absence of a value for a type that may be empty
B.guard let — a construct that conditionally unwraps a wrapped value into a new constant only when it is present
C.guard let — a statement that unwraps a value and exits the current scope early when the value is absent
D.guard let — an operator that supplies a default fallback when the left-hand wrapped value is empty
Answer + AI explanation with Pro
13. What is Nil-coalescing operator (??)?
Junior
A.a type that either holds a value or is nil, written with a trailing question mark
B.an operator that supplies a default fallback when the left-hand wrapped value is empty
C.the keyword representing the absence of a value for a type that may be empty
D.a statement that unwraps a value and exits the current scope early when the value is absent
Answer + AI explanation with Pro
14. Which term means: "an operator that supplies a default fallback when the left-hand wrapped value is empty"?
Junior
A.Nil-coalescing operator (??)
B.nil
C.Optional
D.Optional binding with if let
Answer + AI explanation with Pro
15. Which statement is correct?
Junior
A.Nil-coalescing operator (??) — a construct that conditionally unwraps a wrapped value into a new constant only when it is present
B.Nil-coalescing operator (??) — an operator that supplies a default fallback when the left-hand wrapped value is empty
C.Nil-coalescing operator (??) — the keyword representing the absence of a value for a type that may be empty
D.Nil-coalescing operator (??) — a type that either holds a value or is nil, written with a trailing question mark
Answer + AI explanation with Pro
Free to start
Start with a free readiness check
Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every Optionals question come with Pro.