Uses special functions to handle arrays
/*As you might guess, sorting is something that computers do a */
/*lot of so understanding what is happening is worth your attention. Can */
/*you understand this program? This is not easy -- try some sample */
/*values for the three variables and see if you can go through the */
/*program step by step.*/
/*Note: sorting is high to low*/
/*This is exactly the same as example one except
have changed the variables holding the numbers to an array variable.*/
/*/*This is exactly the same as wk6ex2.c
except that I have expressed the names of all variables in terms of
NO ONE WOULD EVER WRITE CODE THAT LOOKS LIKE THIS!
but my point is to show you that stuff can go on inside the brackets of the
name of an array variable*/
/*Here we go with arrays. This is the same sort program that we */
/*did in the previous example but using array variables. At first the */
/*names of the variables like "num[counter + 1]" will seem very */
/*strange. You may also wonder about the FOR loop inside of a FOR loop. */
/*It works but why did I do it. The answer is so that I can sort more */
/*than three numbers. See the next example.
/*This is the same code as in example 3 except that
it will now sort any number of numbers. (you specify this in howmany)
Note how I have used loops to get and print the values.*/
/*This is the previous example except that:
IT DOESN'T WORK
But why? I have added printf statements to see if I can find out why.
I am trying to illustrate debugging, but unfortunately, your errors
will be different from this one.*/
wk6ex5 is under construction
/*This is the program from wk6ex3.c modified to sort words.
look closely to see what changes I have made*/
This page is at: http://testbed.cis.drexel.edu/Cindex6.html