What will be the output of the following C# code snippet?
class Program
{
static void Main(string[] args)
{
String s = "Hello World";
int i = s.IndexOf('o');
int j = s.LastIndexOf('l');
Console.WriteLine(i + " " + j);
Console.ReadLine();
}
}
class Program
{
static void Main(string[] args)
{
String s = "Hello World";
int i = s.IndexOf('o');
int j = s.LastIndexOf('l');
Console.WriteLine(i + " " + j);
Console.ReadLine();
}
}
A. 9 5
B. 4 9
C. 9 0
D. 9 4
Answer: Option B
Join The Discussion