Tuesday, September 17, 2019

Remove Consonants in C

A program that I wrote using C language that will ask the user to give a string and then the program will remove the consonants in a given string and display the results in the screen.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com.



Sample Program Output


Program Listing

#include <stdio.h>
#include <string.h>

int check_vowel(char ch)
{
    if (ch == 'a' || ch == 'A' || ch == 'e' || ch == 'E' || ch == 'i' || ch == 'I' || ch =='o' || ch=='O' || ch == 'u' || ch == 'U')
      return 1;
    else
      return 0;
}

  char s[200], t[200];
  char reply;
  int c=0, d=0;

int main() {

printf("\n\n");
printf("\tRemove Consonants in C");
     printf("\n\n");
     printf("\tGive a String : ");
     fflush(stdin);
     fgets(s, 200, stdin);
     
        
    for(c = 0; s[c] != '\0'; c++) {
          if(check_vowel(s[c]) == 0) {       
            t[d] = s[c];
            d++;
         }
     }

  t[d] = '\0';
  
  printf("\n\n");
  printf("\tDISPLAY RESULTS");
  printf("\n\n");
  printf("\tOriginal String : %s",s);
  printf("\n\n");
  strcpy(s, t);   
    printf("\tAfter Removing Consonants: %s",s);
  printf("\n\n");
    printf("\n");
  printf("\tEnd of Program");
  return 0;
}






1 comment:

  1. Very informative and impressive post you have written, this is quite interesting and i have went through it completely, an upgraded information is shared, keep sharing such valuable information. Build your website

    ReplyDelete