Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Excuse me, in C language, what happens if you assign a bit to an integer int variable?
Excuse me, in C language, what happens if you assign a bit to an integer int variable?
If it is 1

If it is a structure position field

structure

int a: 1;

int b: 1;

} t;

int n = t.a

In this case, the value of this bit (0 or 1) is assigned to an integer, and the value of n is 0 or 1.