Program to cheque enter character is upper case, lower case, number, space or special characters in C-language

#include<stdio.h>
int main()
{
    char ch;
    printf("Enter the character\n");
    scanf("%c",&ch);
    if(ch>=65&&ch<=90)
    {
        printf("Upper case");
    }
  else if(ch>=97&&ch<=122)
    {
        printf("lower case ");
    }
    else if(ch>=48&&ch<=57)
    {
        printf("Enter character is number");
    }
    else if(ch==32)
    {
        printf("Enter character is space");
    }
    else
    {
        printf("Special character");
    }
    }

OUTPUT
Enter the character
5
Enter character is number

Comments

Popular posts

Creative pattern of butterfly in C-language

Program to show present time and date in C-language

Introduction of C-language.

Program to cheque enter number is a perfect number or not using if else in C-language

Program to cheque four digits number is palindrome or not in C-language

Program to print the cube of a number in c-language

Simple Hello world program in c- language