Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - In C language, the value of unsigned variables is assigned to signed variables.
In C language, the value of unsigned variables is assigned to signed variables.
Use cast.

Unsigned becomes long, short, and the value may be out of bounds, so you will get incorrect results and need to be careful.

Just as bivariate int values may be out of bounds, they need to be handled with care.

Unsigned long integer a = 0xa900

Dragon b;

Short c;

B = (long) a;

printf("%d\n ",b);

C = (short) a;

printf("%d\n ",c);