Question - Write a C# program to find the substring from a given string.
Answer -
internal static void findallsubstring(string str)
{
for (int i = 0; i < str.Length; ++i)
{
StringBuilder subString = new StringBuilder(str.Length - i);
for (int j = i; j < str.Length; ++j)
{
subString.Append(str[j]);
Console.Write(subString + " ");
}
}
}