/* Convert one word of English to Pig Latin. */ #include #include #define N 256 /* maximum string length, including the '\0' */ main() { char english[N]; char piglatin[N]; char suffix[] = "?ay"; printf("Please type a word and press RETURN.\n"); scanf("%s", english); suffix[0] = english[0]; strcpy(piglatin, english + 1); strcat(piglatin, suffix); printf("In Pig Latin, %s is %s.\n", english, piglatin); }