All quizzes
Free quiz · 50 questions in the bank

Rust quiz

Test your Rust knowledge with a free interactive quiz — 50 questions with answers and explanations. No signup needed to play.

Question 1/12Score 0

What is "ownership" in Rust?

In this round
  1. What is "ownership" in Rust?
  2. What does the `?` operator do at the end of an expression?
  3. What is `Option<T>`?
  4. What does `let mut x = 5; x = 6;` do?
  5. What does `if let Some(x) = opt { … }` do?
  6. What is a `Box<T>`?
  7. How do you add methods to a struct?
  8. What is the difference between `String` and `&str`?
  9. What does `&value` produce?
  10. What does this code do: `let s = String::from("hi"); let t = s; println!("{}", s);`?
  11. What does this iterate: `for x in 0..5 { … }`?
  12. What does the borrow checker prevent at compile time?
Gaps to close?
Read the curated Rust notes — core concepts, patterns, interview prep.
Rust notes

More quizzes

.NETAccessibilityAgile MethodologyAlertmanagerAlgorithmsAndroid