Question: Part a ) Write a code that reads a character and prints it ASCII number. Your output format should be similar to the sample below.

Part a) Write a code that reads a character and prints it ASCII number. Your output format should be
similar to the sample below.
Enter a character: B
The ASCII number of B is 66
Part b) Write a code that reads an ASCII character from the user and prints out the corresponding
category from the list below. Do not use any hardcoded ASCII values in your code. For example, to check
if character ch is the letter A, do: if(ch==A) rather than if(ch==65).
Do not use any library call to do these computations (i.e. do not use functions such as isupper, islower,
isdigit).
Uppercase letter
Lowercase letter
Digit (0 to 9)
Other
Here are sample outputs.
Enter a character: C
The character C is uppercase.
Enter a character: 4
The character 4 is a digit.
In the output samples above, user input is shown in blue. Make sure you test and submit multiple cases.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!