Following is a simple code which is supposed to remove all vowels from the supplied string, which is not more than 80 bytes. But it is removing few other alphabets other than vowels. Can anyone tell me wat's wrong??
Could '\b' not be used to for storing a backspace..
Code:void main() { char *p,*t; t=p=(char *)malloc(80); gets(p); while(*p) { if(*p=='A'|| *p=='E' || *p=='I' || *p=='O' || *p=='U'|| *p=='a' || *p=='e' || *p=='i' || *p=='o' || *p=='u') *p='\b'; p++; } puts(t); getch(); }