title: C - Getting Input Type Enum
body: <p>Is it possible to <code>scanf</code> a defined data type?</p>
  <pre><code>#include &lt;stdio.h&gt;
  enum numberByMonth {jan=1,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec};
  main(){
  printf(&quot;\n&quot;);
  printf(&quot;Get Number By Month (type first 3 letters): &quot;);
  enum numberByMonth stringy;
  scanf(&quot;%u&quot;,stringy);
  printf(&quot;Your month number is: %u&quot;,stringy);
  }
  </code></pre>
  <p>Can someone help me with which datatype I should scan for? I set it to %u because gcc told me it was an unsigned integer.</p>