C program to find vowels and remove vowels , C/C++ Programming

C Program to FIND VOWELS AND REMOVE VOWELS

void main()

{

          char s[100],s1[100];

          int i,j,k=0;

          clrscr();

          printf("ENTER ANY STRING: ");

          gets(s);

          for(i=0;s[i]!='\0';i++)

          {

if(s[i]=='a' || s[i]=='e' || s[i]=='i' || s[i]=='o' || s[i]=='u' || s[i]=='A' || s[i]=='E' || s[i]=='I' || s[i]=='O' || s[i]=='U')

                   {

                             k++;

                             printf("\nTHE VOWELS ARE: %c",s[i]);

                             j=i;

                             do{

                             s[j]=s[j+1];

                             j++;

                             }while(s[j]!='\0');

                   }

          }

          printf("\nTHE TOTAL VOWELS ARE: %d",k);

          printf("\nAFTER REMOVING THE VOWELS,THE NEW STRING IS: %s",s);

          getch();

 

}

 

OUTPUT :

 

ENTER THE STRING: KAMLESH MENGAR

 

THE VOWELS ARE: A

THE VOWELS ARE: E

THE VOWELS ARE: A

THE VOWELS ARE: E

TOTAL NO OF VOWELS ARE : 4

 

AFTER REMOVING THE VOWELS, THE NEW STRING IS : KMLSH MNGR

 

Posted Date: 9/10/2012 2:49:33 AM | Location : United States







Related Discussions:- C program to find vowels and remove vowels , Assignment Help, Ask Question on C program to find vowels and remove vowels , Get Answer, Expert's Help, C program to find vowels and remove vowels Discussions

Write discussion on C program to find vowels and remove vowels
Your posts are moderated
Related Questions
what is the purpose of pointer ? what is the syntax? how it works?

i want to check the command line argument is whether an integer or a string

This assignment is to be undertaken individually - no group work is permitted. Background information This assignment is an exercise in simple object-oriented programming and, acco


HOW THE C PROGRAM CODING IMPLEMENTED DY ITSELF UNDERSTANDING . ALSO HOW I CAN A BECOME A GOOD PROGRAMMER IN C WHAT I DO FOR GOOD PROGRAMMING ,TELL ME HOW C CODING DEVELOP DY ITSELF

Study the following table used to compute the tax payable by employees in certain organization   Gross Pay                                  Fewer than Three             Three

My project is compiling but the equation entered is not working

Explain the Bit Wise Operations? C language in particular was created to make it easier to write operating systems. The objective was to have a language that provided excellent

programing code on board coloring in clanguage

A: Depends. Might be "zero" Objects which are thrown must have a publicly accessible copy-constructor. The compiler is permitted to generate code which copies the thrown object