title: Tokenizing strings in C
body: <p>I have been trying to tokenize a string using SPACE as delimiter but it doesn't work. Does any one have suggestion on why it doesn't work?</p>
  
  <p>Edit: tokenizing using:</p>
  
  <pre><code>strtok(string, " ");
  </code></pre>
  
  <p>The code is like the following</p>
  
  <pre><code>pch = strtok (str," ");
  while (pch != NULL)
  {
    printf ("%s\n",pch);
    pch = strtok (NULL, " ");
  }
  </code></pre>