title: Saving an alphanumeric value in an array that is part of a structure
body: <p>In the below code I am defining a structure that only has one variable for now: <code>alphanumeric_code</code>. This variable is an array with 10 values, and should be able to store any alphanumeric value the user enters (i.e. abc123). My questions are:</p>
  <ul>
  <li>How can I store the value the user enters using the secondary function: <code>product_details()</code>?</li>
  <li>Defining an alphanumeric array as <code>int</code> is the best approach, right? According to this other answer: <a href="https://stackoverflow.com/questions/7924815/can-we-store-alphanumeric-values-in-int-data-type">Can we store alphanumeric values in int data type</a>, it seems to be the case.</li>
  </ul>
  <p>Thank you very much guys! :-)</p>
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  typedef struct
  {
      int alphanumeric_code[10];
  } product_structure;
  
  void product_details(product_structure *user_details);
  
  int main()
  {
      product_structure user_details;
  
      product_details(&amp;user_details);
  
      return 0;
  }
  
  void product_details(product_structure *user_details)
  {
      int i = 0;
  
      puts(&quot;Please enter the alphanumeric value:&quot;);
      scanf(&quot;%d&quot;, &amp;(user_details -&gt; alphanumeric_code[10]));
      
      for (i = 0; i &lt; 10; ++i)
      {
          printf(&quot;%c&quot;, user_details -&gt; alphanumeric_code[i]);
      }
  }
  </code></pre>