What will be the output of the following C# code?
static void Main(string[] args)
{
string s = " i love you";
Console.WriteLine(s.IndexOf('l') + " " + s.lastIndexOf('o') + " " + s.IndexOf('e'));
Console.ReadLine();
}
static void Main(string[] args)
{
string s = " i love you";
Console.WriteLine(s.IndexOf('l') + " " + s.lastIndexOf('o') + " " + s.IndexOf('e'));
Console.ReadLine();
}
A. 3 5 7
B. 4 5 6
C. 3 9 6
D. 2 4 6
Answer: Option C
Join The Discussion