Computer Science 202
Systems Programming Concepts Using C
Lab 3 - Character Manipulation
Winter 1998


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:

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.

  1. Source code for your program.
In addition, you must deliver to the instructor by the end of lab on 3rd Tuesday, January 20, 1998 the following:
  1. A printed copy of your source code.


  1. Since this is an in-class lab only minimal commenting is required.
  2. Make sure that you name is on the file.
  3. Meaningful variable names is required.