Distinguishing the type of character entered by the user image

ASCII  abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices.

C++ makes use of ASCII as it's character encoding. Every character has an equivalent ASCII number equivalent.

For example:

  • ASCII Equivalent of @: 064
  • ASCII Equivalent of A: 065
  • ASCII Equivalent of a: 097
  • ASCII Equivalent of 5: 053
  • ASCII Equivalent of $: 036

One can download the comprehensive ASCII equivalent table from the resource given below.

Depending on the ASCII equivalent of the character entered we will classify the input character in the following categories:

  • Symbol (ASCII Range: 0-47,58-64,91-69,12-127)
  • Capital Alphabet (ASCII Range: 65-90)
  • Small Alphabet (ASCII Range: 97-122)
  • Number (ASCII Range: 48-57)

|0 |317

Be Cool!

If you have any other method in your mind, feel free to share us in the comments below. We will include it with this post along with your credits.

Method 1

Using If Else Ladder

Ads By Google - Turn it Off

Leave a Comment