#include <stdio.h>
#include <stdlib.h>
struct
{
unsigned int flag1 : 1;
unsigned int flag2 : 1;
unsigned int count : 4;
} * myBitsPtr;
int main()
{
myBitsPtr = malloc(sizeof(struct));
myBitsPtr->flag1 = 1;
myBitsPtr->flag2 = 0;
myBitsPtr->count = 5;
printf("flag1 = %u, flag2 = %u, count = %u\n", myBitsPtr->flag1,
myBitsPtr->flag2, myBitsPtr->count);
free(myBitsPtr);
return 0;
}