title: How do char and int work in C++
body: <p>May be I'm going to ask a stupid question, but I want to confirm that how char works? Let me explain with examples what i want to ask.
  Let suppose I declare a <code>char variable</code> and then <code>input 6</code> or any integer character.</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  int main(){
      char a;
      cin &gt;&gt; a;
      cout &lt;&lt; a*a; // I know here input's ASCII value will multiply
      return 0;
  }
  </code></pre>
  
  <p>Same as for integer <code>input 6</code></p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  int main(){
      int a;
      cin &gt;&gt; a;
      cout &lt;&lt; a*a; // Why compiler not take input's ASCII Value here?
      return 0;
  }
  </code></pre>
  
  <p>I think now my question is clear.</p>