title: How to clear memory contents in C?
body: <p>I'm defining  a char pointer in this manner.</p>
  
  <pre><code>char *s=(char *)malloc(10);
  </code></pre>
  
  <p>After I fill in all possible values that can fit here, I want to clear whatever I wrote to s and without using malloc again want to write in s? How can I do this?</p>
  
  <p>I need to update the contents but if in the last iteration not all values are updated, then I'll be processing over old values which I do not want to do.</p>