How to Identify type of a variable
<p>How do i properly identify a type of variable in c++. I tried this to identify a type of variable :</p>

<pre><code>int a = 5;
std::cout &lt;&lt; typeid(a).name() &lt;&lt; std::endl;
</code></pre>

<p>And instead of the expected output int, it gives you:</p>

<pre><code>i
</code></pre>

<p>I Am Very confused on why that is happening.. Its somehow giving you only the first letter of the type you are declaring the variable. Int is not the only one... also this:</p>

<pre><code> char a = 'A'
 std::cout &lt;&lt; typeid(a).name() &lt;&lt; std::endl;
</code></pre>

<p><kbd><strong><a href="http://coliru.stacked-crooked.com/a/8ac97217e7764c6c" rel="nofollow"><code>Example Program</code></a></strong></kbd></p>

<p>Is there a simple workaround to this? Any Help would be appreciated!</p>