0

Why is the output of this code = near

x = ""; y = "Sololearn"; x += y.Substring(8,1); x += y.Substring(5,3); Console.Write(x);

9th Oct 2022, 12:54 PM
Mr Ajiero
Mr Ajiero - avatar
1 Answer
+ 2
substring method arg1 == where to start, second arg how many chars do you want to sub, so start at 8 pos and get one Char == n, start at 5 and get 3 chars ear, so x = near
9th Oct 2022, 1:02 PM
Mahmmoud Khalid
Mahmmoud Khalid - avatar