Rust How To Access Elements Of An Array

[Solved] Rust How To Access Elements Of An Array | Rust - Code Explorer | yomemimo.com
Question : rust how to access elements of an array

Answered by : john-niemiec

fn main() { let a = [1, 2, 3, 4, 5]; let first = a[0]; let second = a[1];
}

Source : https://doc.rust-lang.org/book/ch03-02-data-types.html | Last Update : Wed, 12 Jan 22

Answers related to rust how to access elements of an array

Code Explorer Popular Question For Rust