C Program to Check Whether Character is Uppercase or Not without using Library function
Program : Check Whether Entered Character is Uppercase Letter or Not Without using Library Function.
Way 1 :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
#include<stdio.h> int main() { char ch; printf("\nEnter The Character : "); scanf("%c", &ch); if (ch >= 'A' && ch <= 'Z') printf("Character is Upper Case Letters"); else printf("Character is Not Upper Case Letters"); return (0); } |
Way 2 :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
#include<stdio.h> int main() { char ch; printf("\nEnter The Character : "); scanf("%c", &ch); if (ch >= 65 && ch <= 90) printf("Character is Upper Case Letters"); else printf("Character is Not Upper Case Letters"); return (0); } |
Output :
1 2 |
Enter The Character : A Character is Uppercase Letters |
Program Under Section : String Programs