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

/*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*/

/*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. */

/*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.*/

/*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"
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.*/

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

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

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

this page is at