• +91 9723535972
  • info@interviewmaterial.com

CSharp Interview Questions and Answers

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 + " "); 
       } 
   } 
}

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners