Write, compile and run two C programs:
This program should prompt for an integer to be read from standard input in hex (using 0 - 9 and a - f 'digits').
It should then read the value and print the value in hex and in decimal.
Sample execution:
$ h2d Enter an integer (in hex): a5 num = 0x000000a5 = 165
This program should prompt for an input string of characters.
It should read the entire line of input into a string variable (char array), removing the trailing newline if necessary.
Then it should reverse the order of characters in the array and finally, print the reversed string.
Sample execution:
$ reverse Enter a line of input Hello, world! The input line in reverse order: !dlrow ,olleH
In the directory containing your h2d.c and reverse.c files, at the prompt ($ or whatever it is) type
~glancast/submit373 ex1 h2d.cand
~glancast/submit373 ex1 reverse.c
If you submit this way, you do NOT need to submit these programs on Course Online.
If you are using your own Linux machine, you can upload your files for assignment ex1 on the Course Online site.