Examveda

What will be the output of the following C# code snippet?
class Program
{
    static void Main(string[] args)
    {
        String s1 = "CSHARP";
        String s2 = s1.Replace('H','L');
        Console.WriteLine(s2);
        Console.ReadLine();
    }
}

A. CSHAP

B. CSHP

C. CSHALP

D. CSHARP

Answer: Option C


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

Join The Discussion

Related Questions on Miscellaneous in C Sharp