Examveda

What will be the output of the following C# code snippet?
static void Main(string[] args)
{
    string s1 = " Ixg";
    string s2 = s1.Insert(3,"i");
    string s3 = s2.Insert(5, "o");
    for (int i = 0; i < s3.Length; i++)
    Console.WriteLine(s3[i]);
    Console.ReadLine();
}

A. Ixgo

B. Ixig

C. Ixigo

D. Ixg

Answer: Option C


This Question Belongs to C Sharp Programming >> Miscellaneous In C Sharp

Join The Discussion

Related Questions on Miscellaneous in C Sharp