+ 1

How it works?

What is the output of this code? string x = "Sololearn"; Console.WriteLine(x.Split('o')[2]); (output:learn)

6th Aug 2018, 3:58 PM
pro
pro - avatar
1 Answer
+ 3
Here the string x is splitted by "o".When splitting the parts become elements in an array. So x[0]="S", x[1]="l", x[2]= "learn".
6th Aug 2018, 5:14 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar