Remove Vowels From String C Program

C Program To Remove Vowels From String

Here’s a Program Code To Remove Vowels From String in C Programming Language without using any Library Function. This Program Code accepts a String or an Array of Characters and Saves (Copies) all the Non – Vowel Characters into another String.

What are Vowels?

A Letter representing a Vowel Sound having these Letters: A, E, I, O, U.

It is possible to Compare these Vowels by using ASCII Values of the Letters (Vowels in this case) or by directly using Comparison Operator and Remove the Vowels from the String as done in the following Program Code (Method 1).

Here, Library Method strlen() is used to calculate the Length of the String accepted by the User. The Library Function for the same is defined in the string.h Header File.

Also Read: C Program To Solve Tower of Hanoi Problem

Method 1: Code To Remove Vowels From String in C Programming Language

Method 2: C Program To Delete Vowels From String using ASCII Character Value

Also Read: C Program To Print Map of India using Obfuscated Code


Code To Remove Vowels From String in C Programming Language

If you have any Compilation Error or Doubts in this C Program To Remove Vowels From A String, let us know about it in the Comment Section below.

Tushar Soni

I am Tushar Soni, Co - Founder of CodingAlpha. I am a computer science student from India and passionate about Web Development and Programming. Connect with me on Facebook | LinkedIn | Google Plus

5 thoughts on “Remove Vowels From String C Program

  • May 23, 2016 at 9:55 am

    Thanks. The second method for finding characters by ASCII values is comparatively easy. Thanks for both these methods.

  • July 13, 2016 at 3:33 pm

    This version does the following:
    1) In some not optimized compilers or with options, eliminate the necessity to calculate the address of arr1[count] many times;
    2) Removes the necessity of continue changing the == and || to != and &&. It does no change the quantity of verifications but simplify the code a little bit;

  • September 9, 2016 at 4:11 pm

    I am confused between = operator and == operator. Please help me.

    • September 10, 2016 at 2:46 am

      == : Comparison Operator
      = : Assignment Operator
      Assignment Operator is used to store some value in the LHS variable.
      Comparison Operator just compares the two variables on LHS and RHS.

  • October 12, 2016 at 8:40 am

    Is it possible to eliminate vowels from strings using Pointers?


Join The Discussion