C program to check alphabet or not alphabet using conditional operator. / सशर्त ऑपरेटर का उपयोग करके वर्णमाला या वर्णमाला की जांच करने के लिए सी कार्यक्रम।












C program to check alphabet or not alphabet using conditional operator




C program to check alphabet or not alphabet using conditional operator



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


Output:
Enter any character: p p It is ALPHABET Enter any character: $ $ It is NOT ALPHABET