fn main() {
// An array with 3 elements
let mut cars = ["Volvo", "BMW", "Ford"];
// Trying to add another element (a fourth element) to the cars array will result in an error
cars[3] = "Mazda";
}
error: this operation will panic at runtime --> prog.rs:6:3 | 6 | cars[3] = "Mazda"; | ^^^^^^^ index out of bounds: the length is 3 but the index is 3 | = note: `#[deny(unconditional_panic)]` on by default error: aborting due to previous error