Module 2: Variables And Types
Check your understanding
A quick multiple-choice check before you move on. Answer every question, then submit to see how you did.
1.In Rust, what does let x = 5; establish about x compared to C#'s var x = 5;?
2.Which statement about shadowing in Rust is correct, given let x = 5; let x = "now a string";?
3.What type does Rust infer for let f = 3.14;?
4.In a Rust debug build, what happens when integer arithmetic overflows?
5.What is the result of the cast 300i32 as u8 in Rust?
Answer every question to submit.