why am i getting the error
synatx error before ":"
now when in memory what will be the size of the integer will it be of 4 bytes or will it take 3 bits actually.
also if i have to use similar ones like int i:3,j:4:k:1
now how do i access i,j,k individually
You can only use bit fields in structs (that's way the compiler complains about a syntax error):
you can access these fields using the dot "." operator: bit.i
unsigned int i:3;
unsigned int j:4;
unsigned int k:1;
The amount of memory used depends on the compiler, but usually the components of the bitfield are packed in units of size "sizeof(int)".