title: how come printf is printing a non null terminated string?
body: <p>The c programming book says that my string must be null terminated to print it using printf but still the following program prints the string despite it being non null terminated !! </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  int main(){
      int i ;
      char str[10] ;
      for(i = 0 ; i &lt; 10 ; i++ ) {
          str[i] = (char)(i+97) ;
      }
  
      printf("%s",str) ;
  }
  </code></pre>
  
  <p>I am using codeblocks IDE . </p>