#include <iostream>
using namespace std;

#pragma pack(push)
#pragma pack(4)
typedef struct _B
  {
   char a, b, c;
  }B;

typedef struct _C
  {
   char a;
   int b;
   char c;
  }C;

typedef struct _D
  {
   char a;
   char b;
   int c;
  }D;

#pragma pack(1)
typedef struct _B2
  {
   char a, b, c;
  }B2;

typedef struct _C2
  {
   char a;
   int b;
   char c;
  }C2;

typedef struct _D2
  {
   char a;
   char b;
   int c;
  }D2;

#pragma pack(pop)

int main()
  {
   cout << sizeof(_B) << " "<< sizeof(B) << endl;
   cout << sizeof(_C) << " "<< sizeof(C) << endl;
   cout << sizeof(_D) << " "<< sizeof(D) << endl;

   cout << sizeof(_B2) << " "<< sizeof(B2) << endl;
   cout << sizeof(_C2) << " "<< sizeof(C2) << endl;
   cout << sizeof(_D2) << " "<< sizeof(D2) << endl;

   return(0);
  }