String Programming

String Programming

  1. Write a program to find length of a string.
  2. Write a program to copy one string to another string.
  3. Write a program to concatenate two strings.
  4. Write a program to compare two strings.
  5. Write a program to convert lowercase string to uppercase.
  6. Write a program to convert uppercase string to lowercase.
  7. Write a program to toggle case of each character of a string.
  8. Write a program to find total number of alphabets, digits or special character in a string.
  9. Write a program to count total number of vowels and consonants in a string.
  10. Write a program to count total number of words in a string.
  11. Write a program to find reverse of a string.
  12. Write a program to check whether a string is palindrome or not.
  13. Write a program to reverse order of words in a given string.
  14. Write a program to find first occurrence of a character in a given string.
  15. Write a program to find last occurrence of a character in a given string.
  16. Write a program to search all occurrences of a character in given string.
  17. Write a program to count occurrences of a character in given string.
  18. Write a program to find highest frequency character in a string.
  19. Write a program to find lowest frequency character in a string.
  20. Write a program to count frequency of each character in a string.
  21. Write a program to remove first occurrence of a character from string.
  22. Write a program to remove last occurrence of a character from string.
  23. Write a program to remove all occurrences of a character from string.
  24. Write a program to remove all repeated characters from a given string.
  25. Write a program to replace first occurrence of a character with another in a string.
  26. Write a program to replace last occurrence of a character with another in a string.
  27. Write a program to replace all occurrences of a character with another in a string.
  28. Write a program to find first occurrence of a word in a given string.
  29. Write a program to find last occurrence of a word in a given string.
  30. Write a program to search all occurrences of a word in given string.
  31. Write a program to count occurrences of a word in a given string.
  32. Write a program to remove first occurrence of a word from string.
  33. Write a program to remove last occurrence of a word in given string.
  34. Write a program to remove all occurrence of a word in given string.
  35. Write a program to trim leading white space characters from given string.
  36. Write a program to trim trailing white space characters from given string.
  37. Write a program to trim both leading and trailing white space characters from given string.
  38. Write a program to remove all extra blank spaces from given string.