check alphabets using conditional operator

#include<stdio.h>
int main() {
    char ch;
    scanf("%c",&ch);
     (ch>='a' && ch<='z') || (ch>='A' && ch<='Z') ? printf("It is ALPHABET"): printf("It is NOT ALPHABET");
   return 0; 
}

No comments:

Post a Comment