title: Trying to remove the first character of a word and placing it at the end
body: <p>first time posting to this site.
  I'm trying to write a pig latin translating program and am having difficulty in removing the first character of each word in a string and appending it to the end of the word. If anyone could give me any suggestions it would be greatly appreciated. However I am trying not to change what I already have too much. As far as string functions go I am limited to using strcpy, strcmp, strlen, and strtok as I am but a stumped student in a comprehensive course.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  
  void main (void)
  {
   char sentence[81]; /* holds input string */
   char *platin;   /* will point to each word */
  
   printf ("This program translate the words in your sentence.\n");
   printf ("Type end to finish.\n");
  
   do  /* for each sentence */
      {
       printf ("\n\nType a sentence until 'stop': \n ");
       gets (sentence);
  
          platin = strtok (sentence, " ");
       while (platin != NULL)  /*Moves translator from word to word */
              {
  
                  if (strchr("aeiouAEIOU", *platin)) /*Checks for vowels */
                      {
  
                      printf(" %sway ", platin);
                      }
  
                  else if (strchr("bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ",*platin))
                      {
                      printf(" %say", platin);    
                      }
  
  
  
  
               platin = strtok(NULL, " ");
  
  
  
               }
   } while (strcmp(sentence, "stop") != 0 );
  
  }
  </code></pre>