title: Different answers from strlen and sizeof for Pointer & Array based init of String
body: <blockquote>
    <p><strong>Possible Duplicates:</strong><br>
    <a href="https://stackoverflow.com/questions/1335786/c-differences-between-pointer-and-array">C: differences between pointer and array</a><br>
    <a href="https://stackoverflow.com/questions/49046/different-sizeof-results">Different sizeof results</a>  </p>
  </blockquote>
  
  
  
  <p>Basically, I did this...</p>
  
  <pre><code> char *str1 = "Sanjeev";
   char str2[] = "Sanjeev";
   printf("%d %d\n",strlen(str1),sizeof(str1));    
   printf("%d %d\n",strlen(str2),sizeof(str2));
  </code></pre>
  
  <p>and my output was</p>
  
  <pre><code>7 4
  7 8
  </code></pre>
  
  <p>I'm not able to give reasons as to why the <code>sizeof str1</code> is 4. Please explain the difference between these.</p>