C Program to Check Character is Alphabet Digit or Special Character

In this tutorial you will learn about the C Program to Check Character is Alphabet Digit or Special Character and its application with practical example.

C Program to Check Character is Alphabet Digit or Special Character

In this tutorial, we will learn to create a C program that will Check the Character is Alphabet Digit or Special Character in C programming.

Table Of Contents

Prerequisites

Before starting with this tutorial, we assume that you are the best aware of the following C programming topics:

  • Operators in C Programming.
  • Basic Input and Output function in C Programming.
  • Basic C programming.
  • Conditional Statements in C programming.

What is a character?

The character is a single entity in the English language or in any word. These characters can be anything alphabets, digits, special symbols, 

For Example:-

In the word [email protected]”, there are six characters, they are as follows

  1. “W”
  2. “3”
  3. “A”
  4. “d”
  5. ‘d’
  6. ‘a’
  7. ‘@’

Here,

“W” is an alphabet.

“3” is a digit.

“A, d, d, a” are also alphabets.

“@” is a Special Character.

Algorithm:-

Program to check Character is Alphabet Digit or Special Character

First, we will take the input character from the user. Then will pass that character in the conditional statements to find whether the character is the alphabet, digit, special character.

With the help of this program, we can Check the Character with the conditions.

Program Code:-

Output:-

In the above program, we have first initialized the required variable.

  • chr = it will hold the character value for the input.

Input character from the user.

Checking the given character is an alphabet, digit, or special character.

Printing output for the program.

In this tutorial we have learn about the C Program to Check Character is Alphabet Digit or Special Character and its application with practical example. I hope you will like this tutorial.