Given a character, the task is to check whether the given character is in upper case, lower case or non-alphabetic character
Input: ch = 'A' Output: A is an UpperCase character Input: ch = 'a' Output: a is an LowerCase character Input: ch = '0' Output: 0 is not an aplhabetic character
Approach: The key to solve this problem lies in the ASCII value of a character. It is the most simple way to find out about a character. This problem is solved with the help of following detail:
- Capital letter Alphabets (A-Z) lie in the range 65-91 of the ASCII value
- Small letter Alphabets (a-z) lie in the range 97-122 of the ASCII value
- Any other ASCII value is a non-alphabetic character.
A is an UpperCase character a is an LowerCase character 0 is not an aplhabetic character
- Case conversion (Lower to Upper and Vice Versa) of a string using BitWise operators in C/C++
- C Program for Lower Case to Uppercase and vice-versa in a file
- Check input character is alphabet, digit or special character
- Replace every character of a string by a different character
- Check whether the Average Character of the String is present or not
- Python String Methods | Set 1 (find, rfind, startwith, endwith, islower, isupper, lower, upper, swapcase & title)
- Program to print Lower triangular and Upper triangular matrix of an array
- Program for Stair Case Patterns
- String in Switch Case in Java
- Menu-Driven program using Switch-case in C
- Convert characters of a string to opposite case
- Python 3 | Program to print double sided stair-case pattern
- Sum of upper triangle and lower triangle
- Program to check if matrix is upper triangular
- Program to check if matrix is lower triangular
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.