im not sure whats wrong with my code, but mabey someone can help me. I just started programming like 2 and a half weeks ago, so if its that obvious, just bear with me Anyways, i know that the problem is in the function, and i dont know where it is. Oh, and if this is the second post about this question, thats my fault, but i dont think the first one worked for some reason. The point of the program is to translate an inputed sentance into pig latin, by taking the first letter of each word and placing it at the end of the word, followed by "ay"
This is my code so far :
void PrintLatinWord(char *word);
strcpy(delimiters, " ");
printf("Please enter a sentance to be translated:\n");
token = strtok(sentance, delimiters);
while (token != NULL)
token = strtok(NULL, delimiters);
void PrintLatinWord(char *word)
int flag=0, i=0;
//shifts every character one over to the left
strcat(word,tptr); //adds the first letter to the end
strcat(word,tptr); this is where the problem is happening i think... My teacher told me something about using strlen to complete the function, but i just dont understand how, or where!! please help, ASAP, the program is due in like 3 days...