title: What is the length of string when we don't explicitly initialize a character array with null character?
body: <p>I tried the following code on GNU GCC compiler and its giving me output as 26. But I don't understand how the code is working especially what actually <em>strlen()</em> function is doing.</p>
  
  <pre><code>#include&lt;iostream&gt;
  #include&lt;stdio.h&gt;
  #include&lt;string.h&gt;
  
  using namespace std;
  
  int main()
  {
      char b[]={'G','E','E','K','S',' ','F','O','R',' ','F','U','N'};
      cout&lt;&lt;sizeof(b)&lt;&lt;endl;
      cout&lt;&lt;strlen(b)&lt;&lt;endl;
      return 0;
  }
  </code></pre>