Post Top Ad

Your Ad Spot

Pages

Thursday, 6 February 2020

WRITE A PROGRAM To Delete The All Consonants From Given String

#include<stdio.h>
int DelAllConso(char*s)

{
     int i,j;
         for(i=0;s[i];i++)
{
 if(s[i]!='a'&&s[i]!='A'&&s[i]!='E'&&s[i]!='e'&&s[i]!='I'&&s[i]!='i'&&s[i]!='O'&&s[i]!='o'&&s[i]!='U'&&s[i]!='u')
 {     for(j=i;s[j];j++)

       s[j]=s[j+1];
    i=0;
    }
}
return s;
}

void main()
{
   clrscr();
  printf("%s",DelAllConso("AEXABSDEIOO"));

getch();
}

No comments:

Post a Comment

Post Top Ad

Your Ad Spot

Pages