Tuesday, November 24, 2009

Lab 19

1. Make an array of strings for firstname. Make an array of strings for lastname. Read them from a file. Create a third array of strings for fullname, which is firstname followed by a space followed by a last name.

2. Do the same for C-strings.

3. Again with an array of strings, sort them in ascending order and then print them out. Then sort them in descending order and print them out.

4. The same as above, but sort them based on * string length*.

5. Bubble sort a bunch of numbers.

6. Trace through the recursively insertion sort. In the middle of lab, I will demonstrate the three types of sorts, using iteration rather than recursion. This you don't have to hand it, but it would be a good idea to try it, to make sure you really understand it.

No comments:

Post a Comment