Quiz · Borrowing · lesson 11 of 11
Quiz — string slices
What does the program print?
fn main() {
let s = String::from("hello world");
let a = &s[0..5];
let b = &s[6..];
println!("{b} {a}");
}What does the program print?
fn main() {
let s = String::from("hello world");
let a = &s[0..5];
let b = &s[6..];
println!("{b} {a}");
}