15 Pattern Matching questions from the Rust 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.a control-flow construct that compares a value against a series of patterns and runs the arm of the first that fits
B.the compiler requirement that the arms of a match cover every possible case of the scrutinized value
C.binding the individual fields or elements of a compound value to separate variables within a pattern
D.a concise construct that runs a block only when a value matches one specific pattern, optionally with an else
Answer + AI explanation with Pro
2. Which term means: "a control-flow construct that compares a value against a series of patterns and runs the arm of the first that fits"?
Junior
A.match
B.while let
C.if let
D.Exhaustiveness
Answer + AI explanation with Pro
3. Which statement is correct?
Junior
A.match — a control-flow construct that compares a value against a series of patterns and runs the arm of the first that fits
B.match — a concise construct that runs a block only when a value matches one specific pattern, optionally with an else
C.match — a loop that continues executing as long as a value keeps matching the given pattern
D.match — the compiler requirement that the arms of a match cover every possible case of the scrutinized value
Answer + AI explanation with Pro
4. What is if let?
Junior
A.a loop that continues executing as long as a value keeps matching the given pattern
B.a control-flow construct that compares a value against a series of patterns and runs the arm of the first that fits
C.a concise construct that runs a block only when a value matches one specific pattern, optionally with an else
D.the compiler requirement that the arms of a match cover every possible case of the scrutinized value
Answer + AI explanation with Pro
5. Which term means: "a concise construct that runs a block only when a value matches one specific pattern, optionally with an else"?
Junior
A.Destructuring
B.if let
C.while let
D.match
Answer + AI explanation with Pro
6. Which statement is correct?
Junior
A.if let — a concise construct that runs a block only when a value matches one specific pattern, optionally with an else
B.if let — the compiler requirement that the arms of a match cover every possible case of the scrutinized value
C.if let — binding the individual fields or elements of a compound value to separate variables within a pattern
D.if let — a control-flow construct that compares a value against a series of patterns and runs the arm of the first that fits
Answer + AI explanation with Pro
7. What is while let?
Mid
A.a control-flow construct that compares a value against a series of patterns and runs the arm of the first that fits
B.the compiler requirement that the arms of a match cover every possible case of the scrutinized value
C.binding the individual fields or elements of a compound value to separate variables within a pattern
D.a loop that continues executing as long as a value keeps matching the given pattern
Answer + AI explanation with Pro
8. Which term means: "a loop that continues executing as long as a value keeps matching the given pattern"?
Mid
A.while let
B.Destructuring
C.Exhaustiveness
D.match
Answer + AI explanation with Pro
9. Which statement is correct?
Mid
A.while let — the compiler requirement that the arms of a match cover every possible case of the scrutinized value
B.while let — binding the individual fields or elements of a compound value to separate variables within a pattern
C.while let — a concise construct that runs a block only when a value matches one specific pattern, optionally with an else
D.while let — a loop that continues executing as long as a value keeps matching the given pattern
Answer + AI explanation with Pro
10. What is Exhaustiveness?
Mid
A.a concise construct that runs a block only when a value matches one specific pattern, optionally with an else
B.the compiler requirement that the arms of a match cover every possible case of the scrutinized value
C.a control-flow construct that compares a value against a series of patterns and runs the arm of the first that fits
D.a loop that continues executing as long as a value keeps matching the given pattern
Answer + AI explanation with Pro
11. Which term means: "the compiler requirement that the arms of a match cover every possible case of the scrutinized value"?
Mid
A.if let
B.Destructuring
C.match
D.Exhaustiveness
Answer + AI explanation with Pro
12. Which statement is correct?
Mid
A.Exhaustiveness — a loop that continues executing as long as a value keeps matching the given pattern
B.Exhaustiveness — a concise construct that runs a block only when a value matches one specific pattern, optionally with an else
C.Exhaustiveness — binding the individual fields or elements of a compound value to separate variables within a pattern
D.Exhaustiveness — the compiler requirement that the arms of a match cover every possible case of the scrutinized value
Answer + AI explanation with Pro
13. What is Destructuring?
Mid
A.the compiler requirement that the arms of a match cover every possible case of the scrutinized value
B.binding the individual fields or elements of a compound value to separate variables within a pattern
C.a control-flow construct that compares a value against a series of patterns and runs the arm of the first that fits
D.a loop that continues executing as long as a value keeps matching the given pattern
Answer + AI explanation with Pro
14. Which term means: "binding the individual fields or elements of a compound value to separate variables within a pattern"?
Mid
A.Destructuring
B.if let
C.Exhaustiveness
D.match
Answer + AI explanation with Pro
15. Which statement is correct?
Mid
A.Destructuring — binding the individual fields or elements of a compound value to separate variables within a pattern
B.Destructuring — the compiler requirement that the arms of a match cover every possible case of the scrutinized value
C.Destructuring — a loop that continues executing as long as a value keeps matching the given pattern
D.Destructuring — a control-flow construct that compares a value against a series of patterns and runs the arm of the first that fits
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 Pattern Matching question come with Pro.