[ create a new paste ] login | about

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

C++, pasted on Apr 25:
#include<stdio.h>
#include<stdlib.h>

struct xyz 
{ 
  int x : 1; 
  int y : 1; 
  int z : 1; 
}; 


struct abc 
{ 
  char x : 1; 
  int y : 1; 
  bool z : 1; 
};


int main()
{
    
    printf("sizeof(xyz) = %d\tsizeof(abc) = %d",sizeof(struct xyz),sizeof(struct abc));
    return 0;
}


Output:
1
sizeof(xyz) = 4	sizeof(abc) = 4


Create a new paste based on this one


Comments: