title: How does cout work when given an array?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/501816/why-does-cout-print-char-arrays-differently-from-other-arrays">Why does cout print char arrays differently from other arrays?</a>  </p>
  </blockquote>
  
  
  
  <p>If I have this code:</p>
  
  <pre><code>char myArray[] = { 'a', 'b', 'c' };
  cout &lt;&lt; myArray;
  </code></pre>
  
  <p>It gives me this output:</p>
  
  <p><code>abc</code></p>
  
  <p>However, if I have this code:</p>
  
  <pre><code>int myArray[] = { 1, 2, 3 };
  cout &lt;&lt; myArray;
  </code></pre>
  
  <p>It gives me this output:</p>
  
  <p><code>0x28ff30</code></p>
  
  <p>Why does it not print out 123?</p>