Star Patterns
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