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();
}
}
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
Join The Discussion