title: Using strtok in c
body: <p>I need to use strtok to read in a first and last name and seperate it. How can I store the names where I can use them idependently in two seperate char arrays?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  
  int main ()
  {
    char str[] ="test string.";
    char * test;
    test = strtok (str," ");
    while (test != NULL)
    {
      printf ("%s\n",test);
      test= strtok (NULL, " ");
    }
    return 0;
  }
  </code></pre>