title: Why does sizeof return different values for same string in C?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4366600/sizeof-doesnt-return-the-true-size-of-variable-in-c">Sizeof doesn&#39;t return the true size of variable in C</a><br>
    <a href="https://stackoverflow.com/questions/4941142/c-sizeof-string-is-always-8">C -&gt; sizeof string is always 8</a>  </p>
  </blockquote>
  
  
  
  <p>Sizeof prints out 6 for:</p>
  
  <pre><code>printf("%d\n", sizeof("abcde"));
  </code></pre>
  
  <p>But it prints out 4 for:</p>
  
  <pre><code>char* str = "abcde";
  printf("%d\n", sizeof(str));
  </code></pre>
  
  <p>Can someone explain why?</p>