Skip to content

Instantly share code, notes, and snippets.

@saiprasad1996
Created September 18, 2016 09:12
Show Gist options
  • Save saiprasad1996/123e7b94dc7498ce832e24dbaf2cf815 to your computer and use it in GitHub Desktop.
Save saiprasad1996/123e7b94dc7498ce832e24dbaf2cf815 to your computer and use it in GitHub Desktop.
//Progam to remove vowels
#include<stdio.h>
#include<string.h>
int main(){
char *str;
int len,i=0;
printf("Enter a single string ");
scanf("%s",&str);
len=strlen(str);
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' || str[i]=='U'){
str[i]=' ';
}
}
printf("String after removal of vowels %s ",str);
getchar();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment