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
Help for tomorrow...?

There are two ways for initializes in C++ as shown in the example that follows. The first way uses the traditional C notation. The second way uses constructor notation. int foo

dispaly the last ant on rod

Define Functions with arguments and no return values The calling function will read a data from the terminal and pass it on to called as function and this will work good as the

Write a C++ program that can be used to evaluate the credit worthiness of a client. The program reads the credit limit and the price and quantity of the item to be purchased by the

What are the various types of control structures in programming? - Primarily there are 3 types of control structures in programming: Sequence, Selection and Repetition. - Se

Problem Description There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides. But he sometime


What is the difference among malloc/free and new/delete? A: Malloc/free do not know about destructors and constructors. New & delete create and destroy objects, whereas malloc &

Ba s i c r u l e s o f C + + p r o g r a m : ·     I t m u s t h a v e o n l y o n e m a i n f u n c ti o n ·