Patil Ajay profile image 60

How size of each bitfields used in structure can be calculated throgh structure variables????????


int main() { struct value { int bit1:1; int bit3:4; int bit4:4; }bit={1,2,2}; printf("%d %d %d",bit.bit1,bit.bit3,bit.bit4); } o/p is: -1,2,2.........................but I am not getting dat how -1 came...........suggest me p. frnds

placeholder text for bug in Chrome
working