C Program to Delete Vowels from String

« Previous Program Next Program »

Delete Vowels from String in C

To delete vowels from the string in C programming, you have to ask to the user to enter the string, now start checking for vowel (a, A, e, E, i, I, o, O, u, U). If any one found of the 10 then place the next character after the found to the back until the last and so on.

C Programming Code to Delete Vowels from String

Following C program ask to the user to enter a string to find the vowel present in that string then delete the vowel and form the new string, then display the result on the screen:

/* C Program - Delete Vowels from String */

void main()
char str[20];
int len, i, j;
printf("Enter a string : ");
for(i=0; i<len; i++)
if(str[i]=='a' || str[i]=='e' || str[i]=='i' ||
str[i]=='o' || str[i]=='u' || str[i]=='A' ||
str[i]=='E' || str[i]=='I' || str[i]=='O' ||
for(j=i; j<len; j++)
printf("After deleting the vowels, the string will be : %s",str);

When the above c program is compile and executed, it will produce the following result:

c program delete vowels from string

Same Program in Other Programming Language

You may also like same program in other programming languages:

« Previous Program Next Program »

Latest 5 Posts by CodesCracker


Quick Links
Signup - Login - Give Online Test