All String programs in C# with examples

I have used Visual Studio 2012 for debugging purpose. But you can use any version of visul studio as per your availability.

  1. Write a C# program to accept a string from keyboard and print it
  2. Write a C# program to Separate the individual characters from a string
  3. Write a C# program to find the length of a string without using library function
  4. Write a C# program to count a total number of alphabets, digits and special characters in a string
  5. Write a C# program to print individual characters of the string in reverse order
  6. Write a C# program to copy one string to another string
  7. Write a C# program to count a total number of vowel or consonant in a string
  8. Write a C# program to find maximum occurring character in a string
  9. Write a C# program to read a string through the keyboard and sort it using bubble sort
  10. Write a C# program to sort a string array in ascending order
  11. Write a C# program to compare (less than, greater than, equal to ) two substrings
  12. Write a C# program to find the number of times a substring appears in the given string
  13. Write a C# program to check the username and password
  14. Write a C# program to read a sentence and replace lowercase characters by uppercase and vice-versa
  15. Write a C# program to check whether a given substring is present in the given string

Leave a Comment

x