Skip to content
Quiz · Collections · lesson 4 of 10

Quiz — with_capacity

What does the program print?

Rust
fn main() {
    let mut v = Vec::with_capacity(10);
    v.push(1);
    println!("{} {}", v.len(), v.capacity());
}