C Programs - String


String is the most frequently used data type in any language.

In C language, a string is a sequence of characters terminated with a null character \0.

List of programs

  1. C Program to take string as an input
  2. C Program to find length of a string
  3. C Program to copy one string to another string
  4. C Program to concatenate two strings
  5. C Program to convert lowercase string to uppercase
  6. C Program to convert uppercase string to lowercase
  7. C Program to toggle case of a string
  8. C Program to count alphabets, digits and special characters in a string
  9. C Program to count number of vowels and consonants in a string
  10. C program to count number of words in a string
  11. C program to find reverse of a string
  12. C Program to check if a string is a palindrome
  13. C program to find first occurrence of a character in a string
  14. C program to find last occurrence of a character in a string
  15. C program to search all occurrences of a character in a string
  16. C program to find highest frequency character in a string
  17. C program to find lowest frequency character in a string
  18. C program to count frequency of each character in a string
  19. C program to remove first occurrence of a character from string
  20. C program to remove last occurrence of a character from string
  21. C program to remove all occurrences of a character from string
  22. C program to remove all repeated characters from a given string
  23. C Program to replace first occurrence of a character in a string
  24. C Program to replace last occurrence of a character in a string
  25. C program to replace all occurrences of a character in a string
  26. C program to find first occurrence of a word in a string
  27. C program to search all occurrences of a word in a string
  28. C program to remove first occurrence of a word from string
  29. C program to remove last occurrence of a word from string
  30. C program to remove all occurrence of a word from string
  31. C program to trim leading and trailing white spaces from string
  32. C program to remove all extra blank spaces from string