the above code outputs 1 and the code below would output -1. Can someone please explain me the difference in output and how -3 gets stored in 2 bits. I am familiar with the concept of 2's complement.Code:int main() { struct personal { signed x : 2; }emp; emp.x=-3; printf("%d\n",emp.x); }
Code:int main() { struct personal { signed x : 2; }emp; emp.x=3; printf("%d\n",emp.x); }