title: Cast element of character array to integer, and print using cout
body: <p>I have something in my opinion unexpected happening here.</p>
  
  <pre><code>int main(int argc, char* argv[]) {
      cout &lt;&lt; "argv[1] : " &lt;&lt; argv[1] &lt;&lt; endl;
      cout &lt;&lt; "(int)argv[1] : " &lt;&lt; (int)argv[1] &lt;&lt; endl;
  }
  </code></pre>
  
  <p>When I call this:</p>
  
  <pre><code>$ ./a.out 1
  </code></pre>
  
  <p>The output is:</p>
  
  <pre><code>argv[1] : 1
  (int)argv[1] : -1074470344
  </code></pre>
  
  <p>I would expect</p>
  
  <pre><code>argv[1] : 1
  (int)argv[1] : 49
  </code></pre>
  
  <p>Since the ASCII code for <code>'1'</code> is 49.</p>
  
  <p>What is happening here?</p>