In this tutorial you will learn about the C Program to Check Alphabet or Not and its application with practical example.
C Program to Check Alphabet or Not
In this tutorial, we will learn to create a C program that will Check Alphabet or Not using the C programming.
Before starting with this tutorial we assume that you are 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.
- String concepts in C Programming.
Program to Check Vowel or Not
In c programming, it is possible to take character input from the user and Check Alphabet or Not with the help of a very small amount of code. The C language has many types of header libraries which has supported function in them with the help of these files the programming is easy. The string manipulation is very easy in C programming. In today’s program, we will take a character in input and Check Alphabet or Not.
With the help of this program, we can Check Alphabet or Not.
1. Declaring the variables for the program.
2. Taking the input a character from the user.
3. Pass that character to check with condition for alphabet.
4. Printing the output.
5. End Program.
Program to Check Alphabet or Not:-
/* C Program that will Check the given input is a alphabetor not */
//Declaring the variable for the for the program
//Taking the input character from the user
printf("Enter a character: ");
// if input is a charcter
//printing the output for alphabet else not a alphabet
if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
printf("%c is an alphabet.", c);
printf("%c is not an alphabet.", c);
In the above program, we have first initialized the required variable.
- c= it will hold the character value.
Input character from the user.
Program Logic Code.
Printing output Check Alphabet or Not.