Counting Bytes Of Char S
<p>I have a homework, It is:</p>

<blockquote>
  <p>Write the code of function below, this function should count number of bytes inside of s till it is not '\0'.</p>
  
  <p>The function:</p>

<pre><code>unsigned len(const char* s);
</code></pre>
</blockquote>

<p>Really I do not know what this homework mean, can anyone write this homework's code please?
Further more can anyone please explain what does "Const char* s" mean? If you can explain with some examples it would be perfect. </p>

<p>Here is a code which I'm trying to do:</p>

<pre><code>unsigned len(const char* s)
{
    int count=0;; int i=0;
    while (*(s+i)!=0)
    {
        count++;
        i++;
    }
    return count;
}
</code></pre>

<p>But in the main function I do not know what should I write, BTW I have written this:</p>

<pre><code>const char k='m';
const char* s=&amp;k;
cout &lt;&lt; len(s) &lt;&lt; endl;
</code></pre>

<p>The result always is 4! really I do not know what should I do for this question, if I can store only one character in const char, so the result should be the same always. What this question is looking for exactly?</p>
