Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyRustborrowing & and &mutSingle-choice MCQ

To bind `x` so the function can change the caller's value, which form is correct?

fn add_one(n: &mut i32) { *n += 1; } fn main() { let mut x = 7; // call here println!("{}", x); // want 8 }