title: How to Tokenize String without using strtok()
body: <p>I'm trying to tokenize a string without using a <code>strtok()</code>.</p>
  <p>When I run characters of string, it will print in each line.</p>
  <p>For instance, when I run:</p>
  <pre><code>printfTokens(&quot;Hello from other side!&quot;);
  </code></pre>
  <p>The output should be:</p>
  <pre><code>Hello
  from 
  other
  side!
  </code></pre>
  <p>As I'm just learning C, I'm stuck for hours on how to implement this program. So far, I only know the basics and playing around with not (still haven't learned any <code>calloc</code>, <code>mallo</code>c, etc).</p>
  <p>So far I have this code, but the output does not print anything.</p>
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  
  #define MAX_WORD 100
  
  void printfTokens(char *inputString) {
  
      int i;
  
      /*int inputStringLength;
  
      for(i = 0; inputString[i] != '/0'; i++) {
          inputStringLength++;
      }*/
  
      while(inputString[i] != '\0') {
          char testing[MAX_WORD];
          while(inputString[i] != ' ') {
              testing[inputString[i]]++;
              i++;
          }
          printf(&quot;%s&quot;, testing);
          i++;
      }
  }
  
  int main() {
  
      printfTokens(&quot;TESTING ONE! TWO! THREE!&quot;);
  
      return 0;
  }
  </code></pre>