Q14 Any character is entered through the keyboard, write a program to determine whether the character entered is a capital letter, a small case letter, a digit or a special symbol. The Following table shows the range of ASCII values for various characters.
Program: 82
Any character is entered through the keyboard, write a program to determine whether the character entered is a capital letter, a small case letter, a digit or a special symbol.
The Following table shows the range of ASCII values for various characters.
Characters | ASCII Values |
A – Z | 65 – 90 |
a – z | 97 – 122 |
0 – 9 | 48 – 57 |
special symbols | 0 – 47, 58-64, 91 – 96, 123 – 127 |
Output:
Enter a character: A ASCII value of A is: 65 A is a capital letter Enter a character: 0 ASCII value of 0 is: 48 0 is a digit Enter a character: @ ASCII value of @ is: 64 @ is a special symbols