// structure definition & declaration #include struct switching { unsigned light : 1; unsigned fridge : 1; int count; /* 4 bytes */ unsigned stove : 4; unsigned : 4; unsigned radio : 1; unsigned : 0; unsigned flag : 1; } onoffpower ; int main(void) { onoffpower.light = 1; // .....00000001 onoffpower.fridge = 2; // ....00000010 printf("light value is %d\n", onoffpower.light); printf("fridge value is %d\n", onoffpower.fridge); onoffpower.fridge = 5; // ...00000101 printf("New fridge value is %d\n", onoffpower.fridge); return 0; }