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.

CharactersASCII Values
A – Z65 – 90
a – z97 – 122
0 – 948 – 57
special symbols0 – 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

Lokesh Kumar

Being EASTER SCIENCE's founder, Lokesh Kumar wants to share his knowledge and ideas. His motive is "We assist you to choose the best", He believes in different thinking.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.