title: Create a string from char array in C
body: <p>I have a piece of code that loops through a char array string to try and detect words. It loops through and if the detects A - Z or a - z or an _ (underscore) it will add it to a char array. What I need, because they're words, is to be able to put them into a string which I can then use another function to check and then can be discarded. 
  This is my function:</p>
  
  <pre><code>char wholeProgramStr2[20000];
  char wordToCheck[100] ="";
  
  IdentiferFinder(char *tmp){
      //find the identifiers
      int count = 0;
      int i;
      for (i = 0; i &lt; strlen(tmp); ++i){
          Ascii = toascii(tmp[i]);
          if ((Ascii &gt;= 65 &amp;&amp; Ascii &lt;= 90) || (Ascii &gt;= 97 &amp;&amp; Ascii &lt;= 122) || (Ascii == 95))
          {
              wordToCheck[i] = tmp[i];
              count++;
              printf("%c",wordToCheck[i]); 
          }
          else {
              if (count != 0){
              printf("\n");
          }
              count = 0;
          }
      }
      printf("\n");
  }
  </code></pre>
  
  <p>At the moment I can see all of the words because it prints them out on separate lines. </p>
  
  <p>the content of WholeProgram2 is whatever all the lines are of the file. and it is the *tmp argument.</p>
  
  <p>Thank you.</p>