Question
Language: C99 Write a function void print_in_ASCII_order(void) which reads non-whitespace printable ASCII characters (see module 4 slide 56) as input from the keyboard and prints
Language: C99
Write a function void print_in_ASCII_order(void) which reads non-whitespace printable ASCII characters (see module 4 slide 56) as input from the keyboard and prints characters to the screen, in order as they appear on an ASCII table, if and only if they were received as input. For example, if the values read in were C0za0, then the function would print 0Caz and end with a newline character. Notice we printed 0 only once. You may assume the input will always be non-whitespace printable ASCII characters in this part and the next.
PRO TIP: You might want to initialize an array with 128 booleans to aid you in solving this problem. Sometimes indexing an array with a character gives a warning message. You could bypass this by doing
int i = 'a'; char c = a[i];
instead of
char i = 'a'; char c = a[i];
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started