Introduces pointers
Working with strings of char with ahd without pointers
Uses special functions to handle arrays of char.

wk7ex1.txt
/*This is the code that we did for wk6ex3a.c but I have written a function to transpose the numbers.
In this case we need to pass back two new values, but a function returns only one. We get around this by passing pointers -- this lets us change the contents of the variablres belonging to main*/

wk7ex2.txt
/*Pluralizer*/
/*This example simply gets the last letter of a word and checks to see if the letter is "s" If it is, the program assumes that the word is plural. If not the machine "makes it plural" by adding an "s" You can see that this is excessively simplistic but its distance from linguistic reality is a clue as to how hard "real" language processing is. */

wk7exa4.txt
/*This program goes through a char array in two ways: The first way is what we would expect -- using the names word[0], word[1] ... of the variables in the array. The second loop uses a pointer to access successive array values.*/

wk7ex3.c
/*Talking Pig Latin is a child's game that distorts English so that it sounds like a foreign language. Before we can write a program we need to know the rules.
Rule 1: Move all the letters before the first vowel (a,e,i,o,u) to the end of the word and ad "ay"
Examples:
pig = igpay
latin = atinlay
thought = oughtthay
strength = engthstray*/

/*In this first example we work with the word as an array of characters. We avoid both pointers and string functions.*/

/*wk7ex4*/
/*This redoes the previous pig latin example except that
here we use pointers rather than array variable notation*/

/*wk7ex6.c*/
/*This version of pig latin takes advantage of the functions built into the string library*/

/*wk7ex6a.c*/
/*This repeats part of wk7ex6 but with many printf() commands to show what is happening*/

this page is at http://testbed.cis.drexel.edu/Cindex7.html