title: Input hexadecimal value in multiple unsigned char variable
body: <p>I've just started working with hex values (in c language) and below is the code:</p>
  
  <pre><code>int main(){
  
      unsigned char x, y, z;
      scanf("%x", &amp;x);
      scanf("%x", &amp;y);
      scanf("%x", &amp;z);
      printf("val are: %x, %x, %x\n",x,y,z);
      return 0
  }
  </code></pre>
  
  <p>In the above code, why is the value of <code>x</code> and <code>y</code> is getting lost/overwritten and how can I solve it?</p>