Beginner
Rust
Q9 / 100
What is a slice in Rust?
Correct! Well done.
Incorrect.
The correct answer is B) A reference to a contiguous subsequence of elements in a collection
B
Correct Answer
A reference to a contiguous subsequence of elements in a collection
Explanation
&str is a string slice; &[i32] is an integer slice. Slices hold a pointer and a length without owning the data.
Progress
9/100