title: C string concatenation
body: <p>I am trying to input 2 strings in C, and output a 3rd string which the concatenation of string 1 and 2.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  
  /*
   * 
   */
  int main(int argc, char** argv) {
  
      char stringarray1 [30];
      char stringarray2 [30];
      char stringarray3 [30];
  
      int length;
  
      printf("Please enter some text less than 30 characters long\n");
      scanf("%[a-z, ]", &amp;stringarray1);
  
      printf("Please enter some text less than 30 characters long\n");
      scanf("%[a-z, ]", &amp;stringarray2);
  
      strcat(stringarray1, stringarray2);
  
  
      //length = strlen(stringarray);
      printf("The combined string is %s\n", stringarray1);
  
  
      return (EXIT_SUCCESS);
  }
  </code></pre>
  
  <p>It allows me to input the first string, but then prints the seond and third printf statement, without allowing me to enter the second string.</p>
  
  <p>How can i enter the second string without it exiting? Why does it exit?</p>