pch = strtok (myBuffer, " "); while (pch != NULL){ temp = pch[0]; pch[0] = ' '; printf("%s%cay\n", pch, temp); pch = strtok(NULL, " "); }