title: Split string and append them to an array
body: <p>Let's say I have a string containing integers &quot;1 3 4 9&quot; and I want to separate them based on the whitespace between them, and then save them into an array.</p>
  <p>For example:</p>
  <p>Input:</p>
  <pre><code>char str[] = &quot;1 3 4 9&quot;;
  int arr[4];
  
  </code></pre>
  <p>Then arr should be like:</p>
  <pre><code>arr[] = {1, 3, 4, 9}
  </code></pre>
  <p>How to do that in C, please help me. Hope I made the question clear</p>