Hey guys iam new in c and iam learning on my own, I have a task in book which is well complicated(at least for me) .(it want me to create the file , insert the text then copy text without vowels into a new file).
I know i have long way to go with this , so far i figured out how to count vowels ,
but I am trying to find the way for the actual removing vowels from text,

file handling ill manage somehow..
Any help would be nice.. its a challenge for me to learn c but i can't learn everything on my own .. THX for help ..


void main(){
char str[100];
int cnt=0;
char vowels[]={"aeiou"};
int i,j;

printf("enter the string  :  ");gets(str);fflush(stdin);

      { if(str[i]==vowels[j])
      printf("the number of vowels is :%d " ,cnt);


In this task you don't have remove the vowels just don't write them to the new file. Just be sure to read the input file one character at a time. If the character is a vowel the do nothing, if the character is not a vowel then write it to the output file.

:) Thank youuuuuuu ,This is really good point that i didn't realize .I see i need to start reading tasks properly and try to make it as simply as possible(and find the solution). Thank you again ..Now Ill gonna figure out the file handling. :)

This article has been dead for over six months. Start a new discussion instead.