title: sizeof and unsigned char array error? (c/c++)
body: <p>i have written this structure:</p>
  
  <pre><code>struct bmpheader {
      unsigned char magic[2];
      unsigned int fsize;
      unsigned int unused;
      unsigned int pixdata_offset;
      unsigned int headersize;
      unsigned int width;
      unsigned int height;
      unsigned short planes_color;
      unsigned short bpp;
      unsigned int compression;
      unsigned int sizeofpix;
      unsigned int resolutionx;
      unsigned int resolutiony;
      unsigned int colors;
      unsigned int imp_colors;
  };
  </code></pre>
  
  <p>And i have a problem with sizeof function. When im counting on my fingers, its every time 54 bytes for me. sizeof function gives me every time 56. Why? The problem is with unsigned char array, when i remove magic[2] array, sizeof is 52? sizeof(header.magic) is shown as 2. As far i know unsigned char is 1-byte type?</p>
  
  <p>Thanks in advance for responses.</p>
  
  <p>marcin</p>