What would the output of the following program be? fn main() {             let v1 = vec!["A", "B", "C"];   let v1_iter = v1.iter();     for val in v1_iter {     print!("Item: {} ", val);   }   } Group of answer choices A, B, C Item: A Item: A Item: B Item: A Item: B Item: C

icon
Related questions
Question
  1. What would the output of the following program be?

fn main() {

            let v1 = vec!["A", "B", "C"];

  let v1_iter = v1.iter();

 

  for val in v1_iter {

    print!("Item: {} ", val);

  }

 

}

Group of answer choices
A, B, C
Item: A
Item: A Item: B
Item: A Item: B Item: C
 
 
 
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer