C program to check enter alphabet is upper case or lower case using ASCII value and conditional operator. | C वर्णमाला में प्रवेश करने के लिए सी प्रोग्राम ASCII मूल्य और सशर्त ऑपरेटर का उपयोग करके ऊपरी मामला या निचला मामला है।












C program to check enter alphabet is upper case or lower case using ASCII value and conditional operator.




C program to check enter alphabet is upper case or lower case using ASCII value and conditional operator



#include <stdio.h> int main() { char ch; printf("\n Enter any character: "); scanf("%c", &ch); (ch >= 65 && ch <= 90)? printf("\n %c It is uppercase case alphabet .", ch): (ch >= 97 && ch <= 122)? printf("\n %c It is lowercase case alphabet.", ch): printf("\n %c It is not an alphabet.", ch); return 0; }


Output:
Enter any character: Q Q It is uppercase case alphabet . Enter any character: q q It is lowercase case alphabet. Enter any character: 8 8 It is not an alphabet.