Remove Vowels from a given String

Objective: Given a String, remove all the vowels from the string.

What Are Vowels?
The letters A, E, I, O, and U are called vowels. The other letters in the alphabet are called consonants.

Example:

Input String: algorithms @ tutorial horizon
Updated String: lgrthms @ ttrl hrzn

Approach:

Iterate through all the characters, if find vowel, skip it else add it to the result.

Code:


Output:

Input String: algorithms @ tutorial horizon
Updated String: lgrthms @ ttrl hrzn

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.