All characters whether alphabet, digit or special character have ASCII value. Input character from the user will determine if it’s Alphabet, Number or Special character.
ASCII value ranges-
- For capital alphabets 65 – 90
- For small alphabets 97 – 122
- For digits 48 – 57
All other cases are Special Characters.
Input : 8 Output : Digit Input : E Output : Alphabet
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Check if frequency of each character is equal to its position in English Alphabet
- Check whether the given character is in upper case, lower case or non alphabetic character
- Count Uppercase, Lowercase, special character and numeric values
- Check whether the Average Character of the String is present or not
- Special two digit number
- Character arithmetic in C and C++
- Replace a character c1 with c2 and c2 with c1 in a string S
- Character Classification in C++ : cctype
- Frequency of each character in a String using unordered_map in C++
- Convert character array to string in C++
- Data type of character constants in C and C++
- Change/add only one character and print '*' exactly 20 times
- Type difference of character literals in C and C++
- Program to print ASCII Value of a character
- getline() function and character array
- Find the Nth occurrence of a character in the given String
- Print the first and last character of each word in a String
- How to convert a single character to string in C++?
- Print last character of each word in a string
- Program to count occurrence of a given character in a string
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.