Uppercase
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 uppercase(char c)
.
Copy the program uppercase.c
from the course account to your
directory by typing (make sure you type the dot at the end):
The char uppercase(char c)
function takes in a character, c
and if it is an lowercase letter, converts it to uppercase 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 uppercase
To run Styl-o-matic:
$ 1511 stylomatic uppercase.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_uppercase
Or, if you are working from home, upload the relevant file(s) to the wk05_uppercase activity on Give Online.