Multiple choice

What is the meaning of the following statement? s1.insert(4,s2); Where s1 and s2 are string variables.

  1. Insert first five character of s2 into s1 at last position

  2. Insert string s2 after 4th position in string s1

  3. Insert string s2 at 4th position in string s1

  4. Insert string s1 at 4th position in string s2

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

According to the statement, s1.insert(4,s2), it inserts the string s2 after 4th position in string s1.