rust print array
println!("{:?}", x);
rust print array
println!("{:?}", x);
rust reverse an array
let m1: [i32; 5] = [1, 2, 3, 4, 5];
let mut m2 = m1;
m2.reverse();
initializing array rust
let _: [u8; 3] = [1, 2, 3];
let _: [&str; 3] = ["1", "2", "3"];
let _: [String; 3] = [
String::from("1"),
String::from("2"),
String::from("3")
];
let mut rng = rand::thread_rng();
let _: [u8; 3] = [rng.gen(), rng.gen(), rng.gen()];
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us