title: Use strlen with scanf(%ms)
body: <p>Is it possible to use <code>strlen()</code> over a dynamically allocated string? </p>
  
  <p><strong>FOR EXAMPLE</strong>:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  
  int main ()
  {
    char *input=NULL;
    printf ("Enter a sentence: ");
    scanf("%ms", &amp;input);
    //Is this legit?
    printf ("The sentence entered is %u characters long.\n",(unsigned)strlen(input));
    return 0;
  }
  </code></pre>