C Programming: Remove characters in String Except Alphabets
17. Remove Non-Alphabets
Write a program in C to remove characters from a string except alphabets.
Sample Solution:
C Code:
Output:
Remove characters in String Except Alphabets : -------------------------------------------------- Input the string : W3resource.com After removing the Output String : Wresourcecom
Flowchart:
For more Practice: Solve these Related Problems:
- Write a C program to filter a string so that only alphabet characters are retained, removing digits and punctuation.
- Write a C program to copy only the letters from an input string into a new string.
- Write a C program to remove all non-alphabetic characters from a string using ASCII value checks.
- Write a C program to iterate through a string and build a new string containing only alphabetic and space characters.
C Programming Code Editor:
Improve this sample solution and post your code through Disqus.
Previous: Write a program in C to find the number of times a given word 'the' appears in the given string.
Next: Write a program in C to Find the Frequency of Characters.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.