String Operations in C





  1. Write a C program to find the length of a given string without using the built-in strlen() function.
  2. Write a C program to count the number of vowels in a given string.
  3. Write a C program to count the occurrence of a specific character in a given string.
  4. Write a C program to check if two given strings are anagrams or not.
  5. Write a C program to check if a given string is a palindrome or not.
  6. Write a C program to concatenate two strings without using the built-in strcat() function.
  7. Write a C program to convert a given string to uppercase.
  8. Write a C program to convert a given string to lowercase.
  9. Write a C program to reverse a given string.
  10. Write a C program to extract the substring from a given string.
  11. Write a C program to find the first occurrence of a substring within a given string.
  12. Write a C program to replace all occurrences of a specific character in a given string with another character.
  13. Write a C program to remove all occurrences of a specific character from a given string.
  14. Write a C program to remove all leading and trailing spaces from a given string.
  15. Write a C program to remove all duplicate characters from a given string.
  16. Write a C program to find the frequency of each character in a given string.
  17. Write a C program to check if a given string is a valid email address.
  18. Write a C program to check if a given string is a valid URL.
  19. Write a C program to check if a given string is a valid IP address.
  20. Write a C program to check if a given string is a valid palindrome after removing a specific character.
  21. Write a C program to sort the characters in a given string in alphabetical order.
  22. Write a C program to count the number of words in a given string.
  23. Write a C program to reverse the words in a given string.
  24. Write a C program to find the longest word in a given string.
  25. Write a C program to check if a given string contains only numeric characters.
  26. Write a C program to convert a given string to a number (integer).
  27. Write a C program to remove all punctuation marks from a given string.
  28. Write a C program to check if a given string is a valid palindrome ignoring spaces and punctuation marks.
  29. Write a C program to find the second most frequent character in a given string.
  30. Write a C program to find the largest and smallest word in a given string.

Question 1

Write a C program to find the length of a given string without using the built-in strlen() function.

Question 2

Write a C program to count the number of vowels in a given string.