title: String is longer than expected in C
body: <p>Here's my code</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  
  int main(){
      char pal[8] = "ciaooaic";
      char pal1[7] = "ciaoaic";
      int lenPal = strlen(pal);
      int lenPal1 = strlen(pal1);
      printf("strlen('%s'): %d\n", pal, lenPal);
      printf("strlen('%s'): %d\n", pal1, lenPal1);
      return 0;
  }
  </code></pre>
  
  <p>The problem is that when I run this code the output is:</p>
  
  <pre><code>strlen('ciaooaicP@'): 11
  strlen('ciaoaic'): 7
  </code></pre>
  
  <p>The first string has also another non-printable char between P and @. I'm a noob, so maybe I missed something obvious. Can someone help me?</p>
  
  <p>edit:</p>
  
  <blockquote>
    <p>just give one extra space like char pal[9] = "ciaooaic"; char pal1[8] = "ciaoaic"; </p>
  </blockquote>
  
  <p>It works, but why? I understand that there should be a space for \0, but "ciaoaic" works without it...</p>