Lowercase

This is a warmup exercise. It is not compulsory, and may be completed individually or with your lab partner.

You are given a main function, and must implement the function called char lowercase(char c). Copy the program lowercase.c from the course account to your directory by typing (make sure you type the dot at the end):

The char lowercase(char c) function takes in a character, c and if it is an uppercase letter, converts it to lowercase and returns that value. All other input values are returned unchanged.

Some Examples

ABC
abc
ABCabc123
abcabc123
123!@#
123!@#

To run some simple automated tests:

$ 1511 autotest lowercase

To run Styl-o-matic:

$ 1511 stylomatic lowercase.c
Looks good!

You’ll get advice if you need to make changes to your code.

Submit your work with the give command, like so:

$ give cs1511 wk05_lowercase

Or, if you are working from home, upload the relevant file(s) to the wk05_lowercase activity on Give Online.