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 ..
#include<ctype.h>
#include<string.h>
#include<conio.h>
#include<stdio.h>
void main(){
char str[100];
int cnt=0;
char vowels[]={"aeiou"};
int i,j;
clrscr();
printf("enter the string : ");gets(str);fflush(stdin);
for(i=0;i<strlen(str)!=NULL;i++){
str[i]=tolower(str[i]);
}
for(i=0;i<strlen(str)!=NULL;i++)
for(j=0;j<strlen(vowels)!=NULL;j++)
{ if(str[i]==vowels[j])
cnt++;
}
printf("the number of vowels is :%d " ,cnt);
getch();
}