CS1411 - 160 - Programming Principles I, Spring 2005

Lab assignment 10

Motivation

This weeks you will practice different function signatures for the same thing

Mandatory work

Your TA will check that you have done the following things (you may leave once their done) :

Capitalize function

Write a function that will capitalize a string (first character uppercase, rest lowercase, make sure you do not only change the first character!). Write this function multiple times, using all of these function headings:

  • void capitalize1(char *s)
  • void capitalize2(char s[])
  • char *capitalize3(const char s[])
  • void capitalize4(string &s)
  • string capitalize5(string s)

Provide a main function to test your functions (does not have to be fancy, can just be testing it with pre-programmed input).

How?

Please check the labs page on how to get started. There are instructions for visual studio (use version 6) and XCode

Please give the Macs a try. If you simply cannot work with them, go to PE 119, but let your TA know.

Sample programs

have moved to the examples page

Help!

For help: ask your TA! He is here to help you!

If the instructions are unclear or you have any other questions, please email me