[ create a new paste ] login | about

Link: http://codepad.org/FU0z7qIA    [ raw code | output | fork ]

C++, pasted on Nov 30:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#pragma pack(1)
struct S
{
  unsigned short a:15;
  unsigned short b:15;
  unsigned short c:15;
  unsigned short d:2;
  unsigned short e:1;		
};

int main()
{
   printf("%d\n", sizeof(S));
}


Output:
1
6


Create a new paste based on this one


Comments: