title: Is there any way to change char* value at any index?
body: <p>As I know, if we declare <code>char*</code> in our program then it gives memory from read-only area, so we are not able to change a <code>char</code> at any position in the array.</p>
  
  <pre><code>char *ch = "sitaram";
  ch[2] = 'y';
  </code></pre>
  
  <p>The above code will not run properly, as we are changing read-only memory.</p>
  
  <p>One approach is we can declare our <code>char</code> array as</p>
  
  <pre><code>char ch[] = "sitaram";
  </code></pre>
  
  <p>and then we can change a value at an index.</p>
  
  <p>Is there any way where I can change a <code>char</code> value at any index in a <code>char*</code>?</p>