title: strtok not working as expected
body: <p>I tried to write a function that gets a pointer to array of char, reads a string from the user and remove all spaces in the start of the string till the first char that is not string appear. Finally return the copy of the string without space/s in the begining.</p>
  
  <p>For example,</p>
  
  <p>for input <code>abcd</code> the function should return pointer to the string <code>abcd</code>.</p>
  
  <p>for input <code>123 123</code> the function should return pointer to string <code>123 123</code>.</p>
  
  <p>The function is shown below,</p>
  
  <pre><code>void read_RemoveSpace(char * str)/**read the rest of string**/
  {
      char tempRead[30];
      fgets(tempRead,30,stdin);
      char *ptr = strtok(tempRead, " "); /**remove spaces between command and other data**/
      strcpy(str,ptr); /**copy the new string without the spaces.**/
  }
  </code></pre>
  
  <p>But some reason the function <code>strtok()</code> is not working as expected.</p>
  
  <p>In case of input:</p>
  
  <pre><code>   123 456
  </code></pre>
  
  <p>the function returns only the first part without the spaces but not the rest of the string, i.e. it points to</p>
  
  <pre><code>123
  </code></pre>
  
  <p>Any suggestions?</p>