June 14, 2024·2 min read Rust Test nr.1 CodingTestsrust Rust Beginner's Test Time Elapsed: 0 seconds 1. What is the output of the following code? ```rust fn main() { println!("{}", 5 + 3 * 2); } ``` a) 16 b) 13 c) 11 d) 10 2. Which keyword is used to define an immutable variable in Rust? a) let mut b) let c) const d) var 3. How do you declare a function in Rust? a) fn my_function {} b) function my_function() {} c) fn my_function() {} d) func my_function() {} 4. What is the output of the following code? ```rust fn main() { let x = 5; let y = 10; println!("{}", x == y); } ``` a) true b) false c) x d) y 5. How do you create a list in Python with the elements 1, 2, and 3? 6. Explain the difference between clone() and copy() in Rust. 7. Write a Rust expression to check if the string "hello" contains the substring "ell". 8. What is the purpose of the Option type in Rust?