0
pleae explain why i m not able to compare
i tried to compare str[i]=='i' so that i can find it is a vowel or not but it is not comparing it.my problem is to compare a string character and change them to their next alphabet (like a to b) and if they are vowel i have to change them to uppercase...now help me... here is my code... int size=strlen(str); for(int i=0;i<size;i++) { int flag=0; if(str[i]=='a'||str[i]=='e'||str[i]=='i'||str[i]=='o'||str[i]=='u')flag=1; char str[i]++; if(flag==1)str[i]=toupper(str[i]); } all requied hearder files are added now help mee pls
2 Respuestas
+ 4
there is no flag = 1; in your code
+ 1
oh..my mistake...now it ia ok