title: Confused about when exactly I should malloc
body: <p>I know if I am inputting a string into a pointer variable I would malloc that based on the size of the input received. </p>
  
  <p>But what if I am using a pointer variable for the use in <a href="http://en.cppreference.com/w/c/string/byte/strchr" rel="nofollow"><code>strchr</code></a>? For example if I want the pointer to point to the the character "z" in a string. </p>
  
  <pre><code>char *pointer;
  
  pointer=strchr(string,'z');
  </code></pre>
  
  <p>Would I need to malloc pointer? Or is it not needed?</p>