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
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: ifchA rather than ifch
Do not use any library call to do these computations ie do not use functions such as isupper, islower,
isdigit
Uppercase letter
Lowercase letter
Digit to
Other
Here are sample outputs.
Enter a character: C
The character C is uppercase.
Enter a character:
The character 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
