Quizzes

Rust quizzes

Choose a quiz and test your understanding of a focused concept.

How to Disable Dead Code Warnings at the Crate Level in Rust Quiz

Test your understanding of Rust crate-level `dead_code` lint suppression, inner vs outer attributes, scope, mistakes, and examples.

How to Match a String in Rust: String vs &str Match Quiz

Test your Rust knowledge on matching String values with &str literals in match expressions, borrowing with as_str(), and common pitfalls.

How to Print a Variable Type in Rust Quiz

Test your understanding of Rust type inference, `std::any::type_name`, default `f64`, and common mistakes when printing types.

Python String Concatenation Quiz: str, String-Like Values, and Common Mistakes

Test Python string concatenation with `str`, custom string-like values, `+`, `str()`, f-strings, and common mistakes.

Rust Package with Both a Library and a Binary Quiz

Test your understanding of Rust packages with both a library and binary crate, Cargo.toml defaults, crate naming, and common mistakes.

Rust Self-Referential Structs Quiz: Why Values and References Can't Live Together

Test your understanding of why Rust rejects self-referential structs, lifetime errors, moves, and safer design alternatives.

Rust String to Integer Parsing Quiz: Using parse(), String, and &str

Test your understanding of converting String and &str to integers in Rust with parse(), Result handling, common mistakes, and examples.

Rust String vs &str Quiz: Differences, Ownership, and Best Uses

Test your understanding of Rust `String` vs `&str`, including ownership, borrowing, function design, UTF-8 slicing, and common mistakes.

Rust `iter()` vs `into_iter()` Quiz: Borrowed vs Owned Iteration

Test your understanding of Rust `iter()`, `iter_mut()`, and `into_iter()` with practical questions on ownership and iteration.

Why Rust `println!` Output Is Hidden in Unit Tests Quiz

Test your understanding of why `println!` output is hidden in Rust unit tests, how `--nocapture` works, and common testing mistakes.