Remove Vowels From String C Program

By | April 18, 2016

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.

5 thoughts on “Remove Vowels From String C Program

  1. Ajay Sawant

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

  2. Helio Campos Mello de Andrade

    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;

    1. Tushar Soni Post author

      == : 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.


Let's Discuss