A Program to Check a Character is Alphabet or Not
In this example, we are giving a program to check a given character is alphabet or not.
Program to check a character is alphabet or not:
#include <stdio.h>int main(){char c;printf("Enter a character: ");scanf("%c",&c);if( (c>='a' && c<='z') || (c>='A' && c<='Z'))printf("%c is an alphabet.",c);elseprintf("%c is not an alphabet.",c);return 0;}
Output:
Enter a character: F F is an alphabet