c
  1. c-program-to-check-whether-a-character-is-a-vowel-or-consonant

Program to Check Whether a Character is a Vowel or Consonant - ( C Programs )

Example:

Input:

Enter any alphabet: a

Output:

Entered alphabet a is a vowel.

Explanation: The program takes an input from the user in the form of an alphabet character and checks whether it is a vowel or consonant. If the entered character is a vowel, the program outputs a message saying that the entered alphabet is a vowel.

Use:

This C program can be used to determine whether an input character is a vowel or consonant. The program is useful in scenarios when we need to find out the vowels or consonants present in a given word or sentence.

Summary:

In this C program, we have checked whether an input character is a vowel or consonant using a simple if-else condition. If the entered character is a vowel, the program outputs a message stating that the entered alphabet is a vowel. If the entered character is not a vowel, the program outputs a message stating that the entered alphabet is a consonant. This program can be used to check whether any given character is a vowel or consonant.

Published on: