Computer Science 202
Systems Programming Concepts Using C
Lab 3 - Character Manipulation
Write a C program using the GNU C Compiler (gcc) that will
read in a line of text. The program will then print out the
same line of text in reverse order and replace all digits with
their associated upper case letter in the alphabet.
A line of text is any sequence of characters that is terminated by
the new-line symbol (\n). For the purposes of this lab the maximum
number of characters in a line will be 150. For the replacement of
digits the associated upper case letter in the alphabet is as follows:
- 0 -> A
- 1 -> B
- 2 -> C
- 3 -> D
- 4 -> E
- 5 -> F
- 6 -> G
- 7 -> H
- 8 -> I
- 9 -> J
An example session might be something like the following:
Please type in a line of text: I live at 345 Yuck Street in apartment 3b.
Output: .bD tnemtrapa ni teertS kcuY FED ta evil I
The following must be delivered to your instructor via text-only
email by the end of class on 3rd Tuesday January 20, 1998.
In addition, you must deliver to the instructor by the end of lab on
3rd Tuesday, January 20, 1998 the following:
- Source code for your program.
- A printed copy of your source code.
- Since this is an in-class lab only minimal commenting is required.
- Make sure that you name is on the file.
- Meaningful variable names is required.