public static void Main()
Console.Write("\n\nExtract a substring from a given string:\n");
Console.Write("--------------------------------------------\n");
Console.Write("Input the string : ");
str = Console.ReadLine();
arr1 = str.ToCharArray(0, ln);
Console.Write("Input the position to start extraction :");
pos= Convert.ToInt32(Console.ReadLine());
Console.Write("Input the length of substring :");
l= Convert.ToInt32(Console.ReadLine());
Console.Write("The substring retrieve from the string is : ");
Console.Write(arr1[pos+c-1]);