title: Performance on strings initialization in C++
body: <p>I have following questions regarding strings in C++:</p>
  <p>1&gt;&gt; which is a better option(considering performance) and why?</p>
  <p>1.</p>
  <pre><code>string a;
  a = &quot;hello!&quot;;
  </code></pre>
  <p>OR</p>
  <p>2.</p>
  <pre><code>string *a;
  a = new string(&quot;hello!&quot;);
  ...
  delete(a);
  </code></pre>
  <p>2&gt;&gt;</p>
  <pre><code>string a;
  a = &quot;less&quot;; 
  a = &quot;moreeeeeee&quot;; 
  </code></pre>
  <p>how exactly memory management is handled in c++ when a bigger string is copied into a smaller string? Are c++ strings mutable?</p>