title: Passing c string into function
body: <p>I have a question regarding passing c string into function.</p>
  
  <p>If I have a function:</p>
  
  <pre><code>void reverse(char* c){
     //here is the reverse code
  }
  </code></pre>
  
  <p>In the main:</p>
  
  <pre><code>int main(){
     char* c1="abcd";
     char c2[5]="abcd";
     char * c3=new char[5];
     c3="abcd";
  }
  </code></pre>
  
  <p>In my test, only c1 is not allow to pass into the function, other two works fine. I would like to know why c1 is a wrong usage?  Thank you very much!</p>