Thursday, 21 June 2012

write c a program to accept the string from user delete all vowel from that string & display the string


/*write c  a program to accept the string from user  delete all vowel from that
string & display the string*/
#include<stdio.h>
#include<conio.h>
void main()
{
char str[30],str1[30];
char *p,*s;
clrscr();
printf("\nenter the string  :");
gets(str);
p=str;
s=str1;
while(*p)
{
if(*p=='a'||*p=='e'||*p=='i'||*p=='o'||*p=='u')
p++;
else
if(*p=='A'||*p=='E'||*p=='I'||*p=='O'||*p=='U')
p++;
else
*s++=*p++;
}
*s='\0';
printf("\n\nsentences after remooving all vowel :");
puts(str1);
getch();
}
/*
enter the string  :peer saab eeiu mane                                        
                                                                               
                                                                               
sentences after remooving all vowel :pr sb  mn                                
 */

No comments: