title: What does c_str() method from string class returns?
body: <p>I want to access starting address of the array that is maintained by the string class.</p>
  
  <pre><code>string str="hey";
  char* pointer=(char*)str.c_str();
  </code></pre>
  
  <ol>
  <li><p>Is the pointer pointing  to the address of the array(maintained by the string class)? or string class will create a new array from dynamic memory and copy the existing string into it and return it's address?</p></li>
  <li><p>If this is not the right way, then how to access the starting address of the array that is maintained by the string class? </p></li>
  </ol>