title: Changing a char array's values
body: <pre><code>char* foo = (char*) malloc(sizeof(char)*50); foo = "testing";
  </code></pre>
  
  <p>In C, i can see the first character of that string :</p>
  
  <pre><code>printf("%c",foo[0]);
  </code></pre>
  
  <p>But when i try to change that value :</p>
  
  <pre><code>foo[0]='f'
  </code></pre>
  
  <p>It gives error in runtime.</p>
  
  <p>How can i change this, dynamically allocated, char array's values?</p>