Write a program to check whether given character is digit or character in lowercase or uppercase alphabet.
#include<stdio.h> int main() { char ch; printf("Enter the Character: "); scanf("%c",&ch); if(ch >= 65 && ch <= 90) { printf("Alphabet in Upper Case"); } else if(ch >= 97 && ch <= 122) { printf("Alphabet in Lower Case"); } else if(ch >= 48 && ch <= 57) { printf("Character is Number"); } else { printf("Character is Symbol"); } return 0; }
Write a program to check whether given character is digit or character in lowercase or uppercase alphabet.
Reviewed by
on
August 30, 2019
Rating: