title: Concatenating Strings-changing words into pig latin
body: <p>I keep receiving "Segmentation fault (core dumped)".
  How can I swap the first letter of a given word that the user inputs to the end of the word and then add an "ay".
  For example:
  input "Code" 
  output "odecay"</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;string.h&gt;
  int main()
  {
     char pig[100],p[10],i[100];
     int j,length;
     printf("What word would you like to change into pig latin");
     scanf("%s",pig);
     length=strlen(pig);
     strcat(p,pig[0]);
  
     for(j=0;j&lt;length;j++)
     {
        pig[j]=pig[j+1];
     }
     strcat(pig,p);
     strcat(pig,"ay");
     printf("%s",pig);
     return 0;
  }
  </code></pre>