Question: Which of the following shows the contents of vector v1 and v2 after running this code?

  1. Error
  2. v1:{1,2,3,4}; v2:{5};
  3. v1:{1,2,3,4,5}; v2:{1,2,3,4,5};
  4. v1:{1,2,3,4}; v2:{1,2,3,5};

Answer: The correct answer of the above question is Option D:v1:{1,2,3,4}; v2:{1,2,3,5};