Login to ask a question from C programs on various integers

C Program to Check whether an Alphabet is Vowel or Consonant

This program checks whether the input character is vowel or consonant.

Problem Description 

This program takes the character value(entered by user) as input and checks whether that character is a vowel or consonant using if-else statement. Since a user is allowed to enter an alphabet in lowercase and uppercase, the program checks for both uppercase and lowercase vowels and consonants. To understand this program, you should be familiar with the following C Programming concepts:


  • C Programming if statement

  • C Programming if..else statement

Source Code 

#include

int main()

{

    char ch;

    bool isVowel = false;


    printf("Enter an alphabet: ");

    scanf("%c",&ch);


    if(ch=='a'||ch=='A....

Show More
Previous Question Next Question
🔗

Similar Questions

From C programs on various integers · C programming

View All
WhatsApp