Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2015
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.54 KB | None | 0 0
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3.  
  4.  
  5.  
  6. void removeVowels(char* array){
  7.   int i,j,v;
  8.   i=0;
  9.  
  10.   char vowel[]={'a','e','i','o','u'};
  11.   while(array[i]!='\0')
  12.   {
  13.     for(v=0;v<5;v++)
  14.     {
  15.       if (array[i]==vowel[v])
  16.       {
  17.           j=i;
  18.           while(array[j]!='\0')
  19.           {
  20.             array[j]=array[j+1];
  21.             j++;
  22.           }
  23.           i--;
  24.           break;
  25.       }
  26.     }
  27.     i++;
  28.   }
  29.  
  30.  
  31. }
  32.  
  33. int main()
  34. {
  35.  
  36.   char a[]="aqejin amlkteeeeeuoip-";
  37.   removeVowels(a);
  38.  
  39.   printf("%s\n",a);
  40.  
  41.   return 0;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement