title: Strcmp function and char arrays
body: <p>The strcmp function in c is showing some weird behavior.</p>
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;string.h&gt;
  int main()
  {
     char inst1[] = {'A'};
     char inst2[] = {'A'};    
     printf(&quot;%d\n&quot;,strcmp(inst1, inst2));
  
     return 0;
  }
  </code></pre>
  <p>The above code produces an output 65, but it should have produced 0 from my understanding.
  Even more weird behavior follows when I run a slightly different code.</p>
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;string.h&gt;
  
  int main()
  {
     char inst1[] = {'A'};
     char inst2[] = {'A'};
      
     char inst3[] = {'B'};
     char inst4[] = {'B'};
  
     printf(&quot;%d\n&quot;,strcmp(inst1, inst2));
     printf(&quot;%d\n&quot;,strcmp(inst3, inst4));
  
     return 0;
  }
  </code></pre>
  <p>The above code produces an output-</p>
  <pre><code>-1
  66
  </code></pre>
  <p>I have no idea why strcmp is producing such outputs.</p>