Friday, September 13, 2019

Remove Vowels in a String in C


Write a program that will ask the user to give a string or a sentence and then program will remove vowels from the string or a sentence and display the result on the screen using C programming language.

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

remove_vowels.c

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

int main() {
    char arr1[100], temp[100], c;
    char *ptr;
    int count=0, j = 0;
    printf("\n\n");
    printf("\tRemove Vowels in a String");
    printf("\n\n");
    printf("\tEnter A String : ");
    gets(arr1);
    ptr = arr1;
    for(count = 0;count < strlen(ptr);count++) {
        c = ptr[count];
        if(c != 'a' && c != 'e' && c != 'i' && c != 'o' && c != 'u' && c != 'A' && c != 'E' && c != 'I' && c != 'O' && c != 'U') {
            temp[j] = c;
            j++;
        }
    }
    printf("\n\n");
    printf("\tOriginal String:");
    printf("\n\n");
    printf("\t%s",arr1);
    printf("\n\n");
    printf("\tAfter Eliminating Vowels From String:");
    printf("\n\n\n");
    printf("\t");
    for(count = 0;count < j;count++) {
         printf("%c",temp[count]);
    }
printf("\n\n");
    printf("\tEnd of Program");
    printf("\n\n");
}



No comments:

Post a Comment