Rust theorytheory 0/50 · 0%
Fundamentals · easy

4. Tuples, Arrays and Slices

Fixed-size compound types.

Tuples group mixed types and destructure with patterns. Arrays `[T; N]` have a compile-time length. Slices `&[T]` borrow a contiguous view and are fat pointers carrying an address plus a length.

Check your understanding

  1. 1. Type of a 3-element i32 array?

  2. 2. A slice stores…