Check character entered is a special character or not


 #include<stdio.h>

 #include<conio.h>

int main() {

   char ch;

 

   printf("\nEnter The Character : ");

   scanf("%c", &ch);

 

   if (ch >= 'A' && ch <= 'Z') {

      printf("Character is not Special");

   } else if (ch >= 'a' && ch <= 'z') {

      printf("Character is not Special");

   } else {

      printf(" Character Is Special");

   }

 

   return(0);

}

 

Output:-

Enter The Character : w

Character is not Special


Enter The Character : @

 Character Is Special

Comments

Popular posts from this blog

Check whether the no entered is Palindrome or not

Calculate Factorial of a given no with help of Recursion

Find max. and min. element in the integer array