comparison between various method to get size of a string : <p>which way of finding the size of the string in a loop is efficient.
what is time complexity comparison of these methods?</p>

<pre><code>   for(int i = 0; i &lt; s.size(); i++)
   {
    //statements
   }

  for(int i = 0; s[i] != '\0'; i++)
  {
    //statements
  }

  for(int i = 0; i &lt; strlen(s); i++)
  {
    //statements
  }
</code></pre>

<p>how strlen different from size()?</p>
