[Univ of Cambridge] [Dept of Engineering]
next up previous contents
Next: Dodgems: A longer exercise Up: The Standard Library Previous: Adapters

Exercises

Some of the exercises below can be answered in a dozen or so lines of code using the Standard Library, but you'll need to explore the documentation first.

1.
Write a program that given a string by the user determines whether it reads the same both ways
2.
Each line in the unix password file (/etc/passwd) begins with a uid (up to the first ':'). Write a program that reads the uids into a vector of strings, sorts them and then prints out those beginning with 'q'.
3.
Write a program that you can play tic-tac-toe (noughts and crosses) with.



Tim Love
2001-07-05