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

Assignment Help:

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

 


Related Discussions:- C program to find vowels and remove vowels

Matlab to c conversion, i am a engineering student and am working on a proj...

i am a engineering student and am working on a project in audio processing and so i have designed a FIR filter in Matlab . how can i get my Matlab program converted to C program?

C , why c is middle level language?

why c is middle level language?

Polindrome, A palindrome is a string that reads the same from both the ends...

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

Type compatibility, Define  T y pe c o m p a t i b i li t y? ...

Define  T y pe c o m p a t i b i li t y? T o a s s i g n i n t t o s m a l l i n t t h e v a r i a b l e should b e

C, A palindrome is a string that reads the same from both the ends. Given a...

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

Substitution model, (a) Write a procedure called (mult x y) that multiplies...

(a) Write a procedure called (mult x y) that multiplies two numbers x and y in a recursive manner using successive addition. Specifically, note that a x b = a + a + .... + a (b tim

Develop online slot video game for facebook, Develop Online Slot Video Game...

Develop Online Slot Video Game for Facebook Prepare an online slot video game for a Facebook promotion in order to draw new visits and Increase the number of "likes" of the Face

C++ Program Please see where i do mistake, #include #include #include ...

#include #include #include #include #include class Employee { private: char *Name; //Set them as pointers... int IdNumber; char *Department; char *Position; public: voi

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd