title: How to take character input in an array in C?
body: <pre><code>char name[2];
  scanf(&quot;%c&quot;,name);
  printf(&quot;%c&quot;,name);
  </code></pre>
  <p>I am just starting to learn C. I'm curious about the above code, what I got from the printf output, is not the same with the character I typed in. Rather the output was some funny looking symbol. Can someone explain this to me?</p>