title: How to use strtok()
body: <p>I'm writing a C program to study the usage of function <code>strtok()</code>. Here is my code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  
  main() {
      char abc[100] = "ls &amp;";
      char *tok;
  
      tok = strtok(abc, " ");
      while (tok != NULL) {
          printf("%s", tok);
          tok = strtok(NULL, " ");
      }
      printf("\n\n\n\n\n%s", tok);
      return 0;
  }
  </code></pre>
  
  <p>It is printing the following output: </p>
  
  <pre><code>ls&amp;
  
  
  
  
  (null)
  </code></pre>
  
  <p>But I want it to print <code>&amp;</code> at the second <code>printf</code> statement. How do I do it? I need this part for my homework project.</p>