title: C - How to get a word in a string after a particular word?
body: <p>I need a function or API to get a word after a particular word and store it in a string in C?<br />
  For example:</p>
  
  <pre><code>char str[] = "This is a sample sentence for demo";
  char x[10];
  </code></pre>
  
  <p>Now I need to store the word between <code>"sample"</code> and <code>"for"</code> (i.e. sentence) in string <code>x</code>. How can I do that?</p>