15 Error Handling 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.the block structure that runs failable code and handles any raised failure
B.an enum value capturing either a success payload or a failure, useful in callback-based code
C.an expression that turns a thrown failure into an empty optional instead of propagating it
D.a keyword marking that a function may signal a failure to its caller
Answer + AI explanation with Pro
2. Which term means: "a keyword marking that a function may signal a failure to its caller"?
Junior
A.Result type
B.try?
C.throws
D.do-try-catch
Answer + AI explanation with Pro
3. Which statement is correct?
Junior
A.throws — a keyword marking that a function may signal a failure to its caller
B.throws — the block structure that runs failable code and handles any raised failure
C.throws — a statement scheduling cleanup code to run when the current scope is exited by any path
D.throws — an expression that turns a thrown failure into an empty optional instead of propagating it
Answer + AI explanation with Pro
4. What is do-try-catch?
Junior
A.an expression that turns a thrown failure into an empty optional instead of propagating it
B.a statement scheduling cleanup code to run when the current scope is exited by any path
C.an enum value capturing either a success payload or a failure, useful in callback-based code
D.the block structure that runs failable code and handles any raised failure
Answer + AI explanation with Pro
5. Which term means: "the block structure that runs failable code and handles any raised failure"?
Junior
A.throws
B.do-try-catch
C.try?
D.Result type
Answer + AI explanation with Pro
6. Which statement is correct?
Junior
A.do-try-catch — a statement scheduling cleanup code to run when the current scope is exited by any path
B.do-try-catch — a keyword marking that a function may signal a failure to its caller
C.do-try-catch — the block structure that runs failable code and handles any raised failure
D.do-try-catch — an expression that turns a thrown failure into an empty optional instead of propagating it
Answer + AI explanation with Pro
7. What is Result type?
Mid
A.a statement scheduling cleanup code to run when the current scope is exited by any path
B.a keyword marking that a function may signal a failure to its caller
C.an enum value capturing either a success payload or a failure, useful in callback-based code
D.the block structure that runs failable code and handles any raised failure
Answer + AI explanation with Pro
8. Which term means: "an enum value capturing either a success payload or a failure, useful in callback-based code"?
Mid
A.throws
B.do-try-catch
C.try?
D.Result type
Answer + AI explanation with Pro
9. Which statement is correct?
Mid
A.Result type — an enum value capturing either a success payload or a failure, useful in callback-based code
B.Result type — the block structure that runs failable code and handles any raised failure
C.Result type — a keyword marking that a function may signal a failure to its caller
D.Result type — an expression that turns a thrown failure into an empty optional instead of propagating it
Answer + AI explanation with Pro
10. What is try??
Mid
A.an expression that turns a thrown failure into an empty optional instead of propagating it
B.a statement scheduling cleanup code to run when the current scope is exited by any path
C.an enum value capturing either a success payload or a failure, useful in callback-based code
D.the block structure that runs failable code and handles any raised failure
Answer + AI explanation with Pro
11. Which term means: "an expression that turns a thrown failure into an empty optional instead of propagating it"?
Mid
A.do-try-catch
B.try?
C.Result type
D.throws
Answer + AI explanation with Pro
12. Which statement is correct?
Mid
A.try? — an expression that turns a thrown failure into an empty optional instead of propagating it
B.try? — an enum value capturing either a success payload or a failure, useful in callback-based code
C.try? — a keyword marking that a function may signal a failure to its caller
D.try? — the block structure that runs failable code and handles any raised failure
Answer + AI explanation with Pro
13. What is defer?
Senior
A.an expression that turns a thrown failure into an empty optional instead of propagating it
B.the block structure that runs failable code and handles any raised failure
C.a keyword marking that a function may signal a failure to its caller
D.a statement scheduling cleanup code to run when the current scope is exited by any path
Answer + AI explanation with Pro
14. Which term means: "a statement scheduling cleanup code to run when the current scope is exited by any path"?
Senior
A.Result type
B.defer
C.try?
D.do-try-catch
Answer + AI explanation with Pro
15. Which statement is correct?
Senior
A.defer — an expression that turns a thrown failure into an empty optional instead of propagating it
B.defer — a statement scheduling cleanup code to run when the current scope is exited by any path
C.defer — a keyword marking that a function may signal a failure to its caller
D.defer — the block structure that runs failable code and handles any raised failure
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 Error Handling question come with Pro.