Bit Fields
Bit field is a way of saving storage space, such that each field occupies a given number of bits. Example:
struct example1 {
unsigned int f1 :3;
unsigned int f2 :8;
unsigned int f3 :4;
};
struct example1 a,b c;
a.f1 = 2;
a.f2 = 100;
a.f3 = 3;
f1 takes 3 bits, f2 takes 8 bits, f3 takes 4 bits.
a as a whole takes 16 or 32 bits depending on computer.